<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">


<script id="hexo-configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    hostname: new URL('http://yoursite.com').hostname,
    root: '/',
    scheme: 'Pisces',
    version: '7.7.1',
    exturl: false,
    sidebar: {"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},
    copycode: {"enable":false,"show_result":false,"style":null},
    back2top: {"enable":true,"sidebar":false,"scrollpercent":false},
    bookmark: {"enable":false,"color":"#222","save":"auto"},
    fancybox: false,
    mediumzoom: false,
    lazyload: false,
    pangu: false,
    comments: {"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},
    algolia: {
      appID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    },
    localsearch: {"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},
    path: '',
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}
  };
</script>

  <meta name="description" content="unltra-blog">
<meta property="og:type" content="website">
<meta property="og:title" content="unltra">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="unltra">
<meta property="og:description" content="unltra-blog">
<meta property="og:locale" content="en_US">
<meta property="article:author" content="unltra">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="http://yoursite.com/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome: true,
    isPost: false
  };
</script>

  <title>unltra</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-meta">

    <div>
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">unltra</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
  </div>

  <div class="site-nav-toggle">
    <div class="toggle" aria-label="Toggle navigation bar">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>
</div>


<nav class="site-nav">
  
  <ul id="menu" class="menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-fw fa-home"></i>Home</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-fw fa-archive"></i>Archives</a>

  </li>
  </ul>

</nav>
</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content">
            

  <div class="posts-expand">
        
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block home" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/03/07/Linux/Centos7%E9%98%B2%E7%81%AB%E5%A2%99%E9%85%8D%E7%BD%AE/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://s2.ax1x.com/2020/02/04/1BYxFx.jpg">
      <meta itemprop="name" content="unltra">
      <meta itemprop="description" content="unltra-blog">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="unltra">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          
            <a href="/2020/03/07/Linux/Centos7%E9%98%B2%E7%81%AB%E5%A2%99%E9%85%8D%E7%BD%AE/" class="post-title-link" itemprop="url">Linux/Centos7防火墙配置</a>
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2020-03-07 15:57:54" itemprop="dateCreated datePublished" datetime="2020-03-07T15:57:54+08:00">2020-03-07</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2020-03-09 20:03:16" itemprop="dateModified" datetime="2020-03-09T20:03:16+08:00">2020-03-09</time>
              </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <ol>
<li><p>查看防火墙服务状态</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">systemctl status firewalld.service</span><br></pre></td></tr></table></figure></li>
<li><p>查看防火墙状态</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">firewall-cmd --state</span><br></pre></td></tr></table></figure>
</li>
<li><p>开启、重启、关闭、firewalld.service服务</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"># 开启</span><br><span class="line">service start firewalld.service</span><br><span class="line"># 重启</span><br><span class="line">service restart  firewalld.service</span><br><span class="line"># 关闭</span><br><span class="line">service stop firewalld.service</span><br></pre></td></tr></table></figure>
</li>
<li><p>查看防火墙规则</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">firewall-cmd --list-all</span><br></pre></td></tr></table></figure></li>
<li><p>查询、开放、关闭端口</p>
</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"># 查询端口是否开放</span><br><span class="line">firewall-cmd --query-port&#x3D;8080&#x2F;tcp</span><br><span class="line"># 开放80端口</span><br><span class="line">firewall-cmd --permanent --add-port&#x3D;80&#x2F;tcp</span><br><span class="line"># 移除端口</span><br><span class="line">firewall-cmd --permanent --remove-port&#x3D;8080&#x2F;tcp</span><br><span class="line"></span><br><span class="line">#重启防火墙(修改配置后要重启防火墙)</span><br><span class="line">firewall-cmd --reload</span><br><span class="line"></span><br><span class="line"># 参数解释</span><br><span class="line"># 1、firwall-cmd：是Linux提供的操作firewall的一个工具；</span><br><span class="line"># 2、--permanent：表示设置为持久；</span><br><span class="line"># 3、--add-port：标识添加的端口；</span><br></pre></td></tr></table></figure>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

        
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block home" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/03/04/%E5%AE%89%E5%8D%93/Android-%E8%B7%B3%E8%BD%AC%E5%88%B0%E6%96%B0%E6%B5%AA%E5%BE%AE%E5%8D%9A[%E8%BD%AC]/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://s2.ax1x.com/2020/02/04/1BYxFx.jpg">
      <meta itemprop="name" content="unltra">
      <meta itemprop="description" content="unltra-blog">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="unltra">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          
            <a href="/2020/03/04/%E5%AE%89%E5%8D%93/Android-%E8%B7%B3%E8%BD%AC%E5%88%B0%E6%96%B0%E6%B5%AA%E5%BE%AE%E5%8D%9A%5B%E8%BD%AC%5D/" class="post-title-link" itemprop="url">安卓/Android-跳转到新浪微博[转]</a>
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2020-03-04 22:18:11" itemprop="dateCreated datePublished" datetime="2020-03-04T22:18:11+08:00">2020-03-04</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2020-02-02 15:06:59" itemprop="dateModified" datetime="2020-02-02T15:06:59+08:00">2020-02-02</time>
              </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <p>在学习Auto.js时发现安卓的<code>Intent(意图)</code> 是一个很方便的东西，可以跳过模拟点击很多步骤而直接实现功能，比如微信发朋友圈，发微博；</p>
<blockquote>
<p>Intent(意图) 是一个消息传递对象，您可以使用它从其他应用组件请求操作。</p>
</blockquote>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 调起新浪微博客户端的发送微博界面，完成发送微博工作</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> activity</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> content 微博内容</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">openSendWeibo</span><span class="params">(Activity activity,String content)</span></span>&#123;</span><br><span class="line">        <span class="keyword">if</span>(activity==<span class="keyword">null</span>||<span class="keyword">null</span>==content)&#123;</span><br><span class="line">            <span class="keyword">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        Intent intent=<span class="keyword">new</span> Intent();</span><br><span class="line">        intent.setAction(Intent.ACTION_VIEW);</span><br><span class="line">        intent.addCategory(<span class="string">"android.intent.category.DEFAULT"</span>);</span><br><span class="line">        intent.setData(Uri.parse(<span class="string">"sinaweibo://sendweibo?content="</span>+URLEncoder.encode(content)));</span><br><span class="line">        activity.startActivity(intent);</span><br><span class="line">    &#125;</span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * 调起新浪微博客户端的发送微博界面，完成发送微博工作</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> activity </span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> content 微博内容</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> xid 签到时 的地点id</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> poiId POI点ID</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> poiName POI点名称</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> longitude 经度</span></span><br><span class="line"><span class="comment"> * <span class="doctag">@param</span> latitude 纬度</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">openSendWeibo</span><span class="params">(Activity activity,String content,String xid,String poiId,String poiName,String longitude,String latitude)</span></span>&#123;</span><br><span class="line">        <span class="keyword">if</span>(activity==<span class="keyword">null</span>)&#123;</span><br><span class="line">            <span class="keyword">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        Intent intent=<span class="keyword">new</span> Intent();</span><br><span class="line">        intent.setAction(Intent.ACTION_VIEW);</span><br><span class="line">        intent.addCategory(<span class="string">"android.intent.category.DEFAULT"</span>);</span><br><span class="line">        intent.setData(Uri.parse(<span class="string">"sinaweibo://sendweibo?content="</span>+content+<span class="string">"&amp;xid="</span>+xid+<span class="string">"&amp;poiid="</span>+poiId+<span class="string">"&amp;poiname="</span>+poiName+<span class="string">"&amp;longitude="</span>+longitude+<span class="string">"&amp;latitude="</span>+latitude));</span><br><span class="line">        activity.startActivity(intent);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 调用当前用户的周边的人的界面</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> activity</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">openNearbyPeople</span><span class="params">(Activity activity)</span></span>&#123;</span><br><span class="line">        <span class="keyword">if</span>(activity==<span class="keyword">null</span>)&#123;</span><br><span class="line">            <span class="keyword">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        Intent intent=<span class="keyword">new</span> Intent();</span><br><span class="line">        intent.setAction(Intent.ACTION_VIEW);</span><br><span class="line">        intent.addCategory(<span class="string">"android.intent.category.DEFAULT"</span>);</span><br><span class="line">        intent.setData(Uri.parse(<span class="string">"sinaweibo://nearbypeople"</span>));</span><br><span class="line">        activity.startActivity(intent);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 调用当前用户的周边的微博的界面</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> activity</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">openNearbyWeibo</span><span class="params">(Activity activity)</span></span>&#123;</span><br><span class="line">        <span class="keyword">if</span>(activity==<span class="keyword">null</span>)&#123;</span><br><span class="line">            <span class="keyword">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        Intent intent=<span class="keyword">new</span> Intent();</span><br><span class="line">        intent.setAction(Intent.ACTION_VIEW);</span><br><span class="line">        intent.addCategory(<span class="string">"android.intent.category.DEFAULT"</span>);</span><br><span class="line">        intent.setData(Uri.parse(<span class="string">"sinaweibo://nearbyweibo"</span>));</span><br><span class="line">        activity.startActivity(intent);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     *通过昵称 打开个人资料页面</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> activity</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> nickName 昵称</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">openUserInfoByNickName</span><span class="params">(Activity activity,String nickName)</span></span>&#123;</span><br><span class="line">        <span class="keyword">if</span>(activity==<span class="keyword">null</span>)&#123;</span><br><span class="line">            <span class="keyword">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        Intent intent=<span class="keyword">new</span> Intent();</span><br><span class="line">        intent.setAction(Intent.ACTION_VIEW);</span><br><span class="line">        intent.addCategory(<span class="string">"android.intent.category.DEFAULT"</span>);</span><br><span class="line"><span class="comment">//        intent.setData(Uri.parse("sinaweibo://userinfo?nick="+URLEncoder.encode(nickName)));</span></span><br><span class="line">        intent.setData(Uri.parse(<span class="string">"sinaweibo://userinfo?nick="</span>+nickName));</span><br><span class="line">        activity.startActivity(intent);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 通过uid打开个人资料界面</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> activity</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> uid</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">openUserInfoByUid</span><span class="params">(Activity activity,String uid)</span></span>&#123;</span><br><span class="line">        <span class="keyword">if</span>(activity==<span class="keyword">null</span>)&#123;</span><br><span class="line">            <span class="keyword">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        Intent intent=<span class="keyword">new</span> Intent();</span><br><span class="line">        intent.setAction(Intent.ACTION_VIEW);</span><br><span class="line">        intent.addCategory(<span class="string">"android.intent.category.DEFAULT"</span>);</span><br><span class="line">        intent.setData(Uri.parse(<span class="string">"sinaweibo://userinfo?uid="</span>+uid));</span><br><span class="line">        activity.startActivity(intent);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 打开微博客户端内置浏览器</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> activity</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> url 要打开的网页地址</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">openWeiboBrowser</span><span class="params">(Activity activity,String url)</span></span>&#123;</span><br><span class="line">        <span class="keyword">if</span>(activity==<span class="keyword">null</span>)&#123;</span><br><span class="line">            <span class="keyword">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        Intent intent=<span class="keyword">new</span> Intent();</span><br><span class="line">        intent.setAction(Intent.ACTION_VIEW);</span><br><span class="line">        intent.addCategory(<span class="string">"android.intent.category.DEFAULT"</span>);</span><br><span class="line">        intent.setData(Uri.parse(<span class="string">"sinaweibo://browser?url="</span>+url));</span><br><span class="line">        activity.startActivity(intent);</span><br><span class="line">    &#125;</span><br><span class="line">    </span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 打开微博客户端</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> activity</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">openWeibo</span><span class="params">(Activity activity)</span></span>&#123;</span><br><span class="line">        <span class="keyword">if</span>(activity==<span class="keyword">null</span>)&#123;</span><br><span class="line">            <span class="keyword">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        Intent intent=<span class="keyword">new</span> Intent();</span><br><span class="line">        intent.setAction(Intent.ACTION_VIEW);</span><br><span class="line">        intent.addCategory(<span class="string">"android.intent.category.DEFAULT"</span>);</span><br><span class="line">        intent.setData(Uri.parse(<span class="string">"sinaweibo://splash"</span>));</span><br><span class="line"> </span><br><span class="line">        activity.startActivity(intent);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 打开摇一摇界面</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> activity</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">openShake</span><span class="params">(Activity activity)</span></span>&#123;</span><br><span class="line">        <span class="keyword">if</span>(activity==<span class="keyword">null</span>)&#123;</span><br><span class="line">            <span class="keyword">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        Intent intent=<span class="keyword">new</span> Intent();</span><br><span class="line">        intent.setAction(Intent.ACTION_VIEW);</span><br><span class="line">        intent.addCategory(<span class="string">"android.intent.category.DEFAULT"</span>);</span><br><span class="line">        intent.setData(Uri.parse(<span class="string">"sinaweibo://shake"</span>));</span><br><span class="line"> </span><br><span class="line">        activity.startActivity(intent);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 打开通讯录界面</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> activity</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">openContact</span><span class="params">(Activity activity)</span></span>&#123;</span><br><span class="line">        <span class="keyword">if</span>(activity==<span class="keyword">null</span>)&#123;</span><br><span class="line">            <span class="keyword">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        Intent intent=<span class="keyword">new</span> Intent();</span><br><span class="line">        intent.setAction(Intent.ACTION_VIEW);</span><br><span class="line">        intent.addCategory(<span class="string">"android.intent.category.DEFAULT"</span>);</span><br><span class="line">        intent.setData(Uri.parse(<span class="string">"sinaweibo://contact"</span>));</span><br><span class="line"> </span><br><span class="line">        activity.startActivity(intent);</span><br><span class="line">        </span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 打开用户话题列表界面</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> activity</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> uid 用户uid</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">openUserTrends</span><span class="params">(Activity activity,String uid)</span></span>&#123;</span><br><span class="line">        <span class="keyword">if</span>(activity==<span class="keyword">null</span>)&#123;</span><br><span class="line">            <span class="keyword">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        Intent intent=<span class="keyword">new</span> Intent();</span><br><span class="line">        intent.setAction(Intent.ACTION_VIEW);</span><br><span class="line">        intent.addCategory(<span class="string">"android.intent.category.DEFAULT"</span>);</span><br><span class="line">        intent.setData(Uri.parse(<span class="string">"sinaweibo://usertrends?uid="</span>+uid));</span><br><span class="line">        activity.startActivity(intent);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 打开私信对话界面</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> activity</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> uid 用户uid</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">openMessageListByUid</span><span class="params">(Activity activity,String uid)</span></span>&#123;</span><br><span class="line">        <span class="keyword">if</span>(activity==<span class="keyword">null</span>)&#123;</span><br><span class="line">            <span class="keyword">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        Intent intent=<span class="keyword">new</span> Intent();</span><br><span class="line">        intent.setAction(Intent.ACTION_VIEW);</span><br><span class="line">        intent.addCategory(<span class="string">"android.intent.category.DEFAULT"</span>);</span><br><span class="line">        intent.setData(Uri.parse(<span class="string">"sinaweibo://messagelist?uid="</span>+uid));</span><br><span class="line">        activity.startActivity(intent);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 打开私信对话界面</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> activity</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> uid 用户uid</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">openMessageListByNickName</span><span class="params">(Activity activity,String nickName)</span></span>&#123;</span><br><span class="line">        <span class="keyword">if</span>(activity==<span class="keyword">null</span>)&#123;</span><br><span class="line">            <span class="keyword">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        Intent intent=<span class="keyword">new</span> Intent();</span><br><span class="line">        intent.setAction(Intent.ACTION_VIEW);</span><br><span class="line">        intent.addCategory(<span class="string">"android.intent.category.DEFAULT"</span>);</span><br><span class="line">        intent.setData(Uri.parse(<span class="string">"sinaweibo://messagelist?nick="</span>+(nickName)));</span><br><span class="line">        activity.startActivity(intent);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 打开某条微博正文</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> activity</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> blogId 某条微博id</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">openDetail</span><span class="params">(Activity activity,String blogId)</span></span>&#123;</span><br><span class="line">        <span class="keyword">if</span>(activity==<span class="keyword">null</span>)&#123;</span><br><span class="line">            <span class="keyword">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        Intent intent=<span class="keyword">new</span> Intent();</span><br><span class="line">        intent.setAction(Intent.ACTION_VIEW);</span><br><span class="line">        intent.addCategory(<span class="string">"android.intent.category.DEFAULT"</span>);</span><br><span class="line">        intent.setData(Uri.parse(<span class="string">"sinaweibo://detail?mblogid="</span>+blogId));</span><br><span class="line">        activity.startActivity(intent);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>————————————————<br>版权声明：本文为CSDN博主「csc_1024」的原创文章，遵循 CC 4.0 BY-SA 版权协议，转载请附上原文出处链接及本声明。<br>原文链接：<a href="https://blog.csdn.net/csclmf/article/details/78632926" target="_blank" rel="noopener">https://blog.csdn.net/csclmf/article/details/78632926</a></p>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

        
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block home" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/03/04/%E8%BD%AF%E4%BB%B6%E5%8F%8A%E5%B0%8F%E5%B7%A5%E5%85%B7/%E5%8F%B2%E4%B8%8A%E6%9C%80%E5%85%A8%E7%BD%91%E5%9D%80%E5%AF%BC%E8%88%AA%E5%A4%A7%E5%85%A8%EF%BC%8C%E8%AE%A9%E4%B8%96%E4%B8%8A%E6%B2%A1%E6%9C%89%E6%89%BE%E4%B8%8D%E5%88%B0%E7%9A%84%E5%A5%BD%E4%B8%9C%E8%A5%BF/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://s2.ax1x.com/2020/02/04/1BYxFx.jpg">
      <meta itemprop="name" content="unltra">
      <meta itemprop="description" content="unltra-blog">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="unltra">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          
            <a href="/2020/03/04/%E8%BD%AF%E4%BB%B6%E5%8F%8A%E5%B0%8F%E5%B7%A5%E5%85%B7/%E5%8F%B2%E4%B8%8A%E6%9C%80%E5%85%A8%E7%BD%91%E5%9D%80%E5%AF%BC%E8%88%AA%E5%A4%A7%E5%85%A8%EF%BC%8C%E8%AE%A9%E4%B8%96%E4%B8%8A%E6%B2%A1%E6%9C%89%E6%89%BE%E4%B8%8D%E5%88%B0%E7%9A%84%E5%A5%BD%E4%B8%9C%E8%A5%BF/" class="post-title-link" itemprop="url">软件及小工具/史上最全网址导航大全，让世上没有找不到的好东西</a>
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2020-03-04 22:18:11" itemprop="dateCreated datePublished" datetime="2020-03-04T22:18:11+08:00">2020-03-04</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2020-02-29 18:28:00" itemprop="dateModified" datetime="2020-02-29T18:28:00+08:00">2020-02-29</time>
              </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h1 id="收录的导航网址大全"><a href="#收录的导航网址大全" class="headerlink" title="收录的导航网址大全"></a>收录的导航网址大全</h1><p>好用和常用的网址几乎都在里面,个人喜欢往浏览器书签收藏夹里塞喜欢的干货和网站，以至于收藏夹里有着几千条网址，所以比较喜欢导航，但是浏览器原生自带的导航又太low,所以一般自己设置打开浏览器时即开的导航页便于工作和学习. <code>辛苦收集整理，喜欢给个赞哦</code>😁</p>
<h2 id="常用"><a href="#常用" class="headerlink" title="常用"></a>常用</h2><table>
<thead>
<tr>
<th>导航名</th>
<th>地址</th>
</tr>
</thead>
<tbody><tr>
<td><a href="https://tophub.today/" target="_blank" rel="noopener">今日热榜</a></td>
<td><a href="https://tophub.today" target="_blank" rel="noopener">https://tophub.today</a></td>
</tr>
<tr>
<td><a href="http://ilxdh.com" target="_blank" rel="noopener">龙轩导航</a></td>
<td><a href="http://ilxdh.com" target="_blank" rel="noopener">http://ilxdh.com</a></td>
</tr>
<tr>
<td><a href="http://magnet.chongbuluo.com/" target="_blank" rel="noopener">虫部落</a></td>
<td><a href="http://magnet.chongbuluo.com" target="_blank" rel="noopener">http://magnet.chongbuluo.com</a></td>
</tr>
<tr>
<td><a href="https://e.xitu.io" target="_blank" rel="noopener">掘金酱</a></td>
<td><a href="https://e.xitu.io" target="_blank" rel="noopener">https://e.xitu.io</a></td>
</tr>
<tr>
<td><a href="http://guozhivip.com/nav/" target="_blank" rel="noopener">果汁导航</a></td>
<td><a href="http://guozhivip.com/nav" target="_blank" rel="noopener">http://guozhivip.com/nav</a></td>
</tr>
<tr>
<td><a href="https://www.zhansousou.com" target="_blank" rel="noopener">站搜搜导航</a></td>
<td><a href="https://www.zhansousou.com" target="_blank" rel="noopener">https://www.zhansousou.com</a></td>
</tr>
<tr>
<td><a href="www.9178.work">沃客导航</a></td>
<td><a href="http://www.9178.work" target="_blank" rel="noopener">www.9178.work</a></td>
</tr>
<tr>
<td><a href="https://oo1.win/" target="_blank" rel="noopener">炫猿</a></td>
<td><a href="https://oo1.win" target="_blank" rel="noopener">https://oo1.win</a></td>
</tr>
<tr>
<td><a href="http://ailongmiao.com/" target="_blank" rel="noopener">龙喵导航</a></td>
<td><a href="http://ailongmiao.com" target="_blank" rel="noopener">http://ailongmiao.com</a></td>
</tr>
<tr>
<td><a href="http://lackar.com/aa/" target="_blank" rel="noopener">AnywhereAnything</a></td>
<td><a href="http://lackar.com/aa" target="_blank" rel="noopener">http://lackar.com/aa</a></td>
</tr>
<tr>
<td><a href="http://www.ziliao6.com/" target="_blank" rel="noopener">牛导航</a></td>
<td><a href="http://www.ziliao6.com" target="_blank" rel="noopener">http://www.ziliao6.com</a></td>
</tr>
<tr>
<td><a href="https://www.moulem.com/" target="_blank" rel="noopener">某柠檬导航</a></td>
<td><a href="https://www.moulem.com" target="_blank" rel="noopener">https://www.moulem.com</a></td>
</tr>
<tr>
<td><a href="http://www.miguyu.com/" target="_blank" rel="noopener">咪咕鱼导航</a></td>
<td><a href="http://www.miguyu.com" target="_blank" rel="noopener">http://www.miguyu.com</a></td>
</tr>
<tr>
<td><a href="https://web.geekji.cn/" target="_blank" rel="noopener">钛导航</a></td>
<td><a href="https://web.geekji.cn" target="_blank" rel="noopener">https://web.geekji.cn</a></td>
</tr>
<tr>
<td><a href="https://lai.yuweining.cn/" target="_blank" rel="noopener">不死鸟</a></td>
<td><a href="https://lai.yuweining.cn" target="_blank" rel="noopener">https://lai.yuweining.cn</a></td>
</tr>
<tr>
<td><a href="https://anyi.life/" target="_blank" rel="noopener">安逸导航</a></td>
<td><a href="https://anyi.life" target="_blank" rel="noopener">https://anyi.life</a></td>
</tr>
<tr>
<td><a href="http://daohangwan.com/" target="_blank" rel="noopener">导航湾</a></td>
<td><a href="http://daohangwan.com" target="_blank" rel="noopener">http://daohangwan.com</a></td>
</tr>
<tr>
<td><a href="http://lxqnsys.com/d/" target="_blank" rel="noopener">五花八门</a></td>
<td><a href="http://lxqnsys.com/d" target="_blank" rel="noopener">http://lxqnsys.com/d</a></td>
</tr>
<tr>
<td><a href="https://www.24kdh.com/" target="_blank" rel="noopener">24k导航</a></td>
<td><a href="https://www.24kdh.com" target="_blank" rel="noopener">https://www.24kdh.com</a></td>
</tr>
<tr>
<td><a href="http://qiachu.com/" target="_blank" rel="noopener">洽初导航</a></td>
<td><a href="http://qiachu.com" target="_blank" rel="noopener">http://qiachu.com</a></td>
</tr>
<tr>
<td><a href="http://www.jspoo.com/" target="_blank" rel="noopener">聚神铺导航</a></td>
<td><a href="http://www.jspoo.com" target="_blank" rel="noopener">http://www.jspoo.com</a></td>
</tr>
<tr>
<td><a href="http://321ku.com/" target="_blank" rel="noopener">321酷生活导航</a></td>
<td><a href="http://321ku.com" target="_blank" rel="noopener">http://321ku.com</a></td>
</tr>
<tr>
<td><a href="https://www.bidianer.com/#/" target="_blank" rel="noopener">笔点导航</a></td>
<td><a href="https://www.bidianer.com" target="_blank" rel="noopener">https://www.bidianer.com</a></td>
</tr>
<tr>
<td><a href="http://mackxin.com/nav.html" target="_blank" rel="noopener">馨客栈</a></td>
<td><a href="http://mackxin.com/nav.html" target="_blank" rel="noopener">http://mackxin.com/nav.html</a></td>
</tr>
<tr>
<td><a href="https://www.1024cs.com/" target="_blank" rel="noopener">1024导航</a></td>
<td><a href="https://www.1024cs.com" target="_blank" rel="noopener">https://www.1024cs.com</a></td>
</tr>
<tr>
<td><a href="https://wht.im/" target="_blank" rel="noopener">万花筒</a></td>
<td><a href="https://wht.im" target="_blank" rel="noopener">https://wht.im</a></td>
</tr>
<tr>
<td><a href="https://www.benbenla.com" target="_blank" rel="noopener">本本啦导航</a></td>
<td><a href="https://www.benbenla.com" target="_blank" rel="noopener">https://www.benbenla.com</a></td>
</tr>
<tr>
<td><a href="http://ziyuangou.com/" target="_blank" rel="noopener">资源狗</a></td>
<td><a href="http://ziyuangou.com" target="_blank" rel="noopener">http://ziyuangou.com</a></td>
</tr>
<tr>
<td><a href="http://byr.wiki" target="_blank" rel="noopener">北邮人导航</a></td>
<td><a href="http://byr.wiki" target="_blank" rel="noopener">http://byr.wiki</a></td>
</tr>
</tbody></table>
<h2 id="职业专属"><a href="#职业专属" class="headerlink" title="职业专属"></a>职业专属</h2><table>
<thead>
<tr>
<th>导航名</th>
<th>地址</th>
</tr>
</thead>
<tbody><tr>
<td><a href="http://www.yechuang.top/" target="_blank" rel="noopener">野创网导航-提供各个垂直行业网站</a></td>
<td><a href="http://www.yechuang.top" target="_blank" rel="noopener">http://www.yechuang.top</a></td>
</tr>
<tr>
<td><a href="http://www.gaoxiaosouluo.cn/" target="_blank" rel="noopener">高效搜罗-精准的职业导航</a></td>
<td><a href="http://www.gaoxiaosouluo.cn" target="_blank" rel="noopener">http://www.gaoxiaosouluo.cn</a></td>
</tr>
<tr>
<td><a href="http://www.moe123.net/" target="_blank" rel="noopener">萌导航</a></td>
<td><a href="http://www.moe123.net" target="_blank" rel="noopener">http://www.moe123.net</a></td>
</tr>
<tr>
<td><a href="https://gogeeks.cn/nav" target="_blank" rel="noopener">极客导航</a></td>
<td><a href="https://gogeeks.cn/nav" target="_blank" rel="noopener">https://gogeeks.cn/nav</a></td>
</tr>
<tr>
<td><a href="http://www.1nami.com/" target="_blank" rel="noopener">1纳米学习网站导航</a></td>
<td><a href="http://www.1nami.com" target="_blank" rel="noopener">http://www.1nami.com</a></td>
</tr>
<tr>
<td><a href="https://dh.woshipm.com/" target="_blank" rel="noopener">产品经理导航</a></td>
<td><a href="https://dh.woshipm.com" target="_blank" rel="noopener">https://dh.woshipm.com</a></td>
</tr>
<tr>
<td><a href="http://pm256.com" target="_blank" rel="noopener">产品经理导航2</a></td>
<td><a href="http://pm256.com" target="_blank" rel="noopener">http://pm256.com</a></td>
</tr>
<tr>
<td><a href="http://www.yunyingxuetang.com/daohang.html" target="_blank" rel="noopener">新媒体运营网址导航</a></td>
<td><a href="http://www.yunyingxuetang.com/daohang.html" target="_blank" rel="noopener">http://www.yunyingxuetang.com/daohang.html</a></td>
</tr>
<tr>
<td><a href="http://hao.199it.com/" target="_blank" rel="noopener">大数据导航</a></td>
<td><a href="http://hao.199it.com" target="_blank" rel="noopener">http://hao.199it.com</a></td>
</tr>
<tr>
<td><a href="http://www.zscqdh.cn/" target="_blank" rel="noopener">知识产权导航</a></td>
<td><a href="http://www.zscqdh.cn" target="_blank" rel="noopener">http://www.zscqdh.cn</a></td>
</tr>
<tr>
<td><a href="http://go.dxy.cn/" target="_blank" rel="noopener">丁香医学导航</a></td>
<td><a href="http://go.dxy.cn" target="_blank" rel="noopener">http://go.dxy.cn</a></td>
</tr>
<tr>
<td><a href="http://www.meddir.cn/" target="_blank" rel="noopener">医学导航</a></td>
<td><a href="http://www.meddir.cn" target="_blank" rel="noopener">http://www.meddir.cn</a></td>
</tr>
<tr>
<td><a href="http://www.mynav.cn/" target="_blank" rel="noopener">科研导航</a></td>
<td><a href="http://www.mynav.cn" target="_blank" rel="noopener">http://www.mynav.cn</a></td>
</tr>
<tr>
<td><a href="http://www.world68.com/" target="_blank" rel="noopener">国外网站大全</a></td>
<td><a href="http://www.world68.com" target="_blank" rel="noopener">http://www.world68.com</a></td>
</tr>
<tr>
<td><a href="http://www.qkankan.com" target="_blank" rel="noopener">去看看-国外网站</a></td>
<td><a href="http://www.qkankan.com" target="_blank" rel="noopener">http://www.qkankan.com</a></td>
</tr>
<tr>
<td><a href="https://www.egouz.com/" target="_blank" rel="noopener">国外网址推荐</a></td>
<td><a href="https://www.egouz.com" target="_blank" rel="noopener">https://www.egouz.com</a></td>
</tr>
<tr>
<td><a href="http://gds123.cn/" target="_blank" rel="noopener">龟大师网络营销BAT网站</a></td>
<td><a href="http://gds123.cn" target="_blank" rel="noopener">http://gds123.cn</a></td>
</tr>
<tr>
<td><a href="http://www.quqiaoqiao.com" target="_blank" rel="noopener">去瞧瞧-互联网创业者</a></td>
<td><a href="http://www.quqiaoqiao.com" target="_blank" rel="noopener">http://www.quqiaoqiao.com</a></td>
</tr>
<tr>
<td><a href="http://daohang.esnai.com/" target="_blank" rel="noopener">会计网址导航</a></td>
<td><a href="http://daohang.esnai.com" target="_blank" rel="noopener">http://daohang.esnai.com</a></td>
</tr>
<tr>
<td><a href="http://www.archiname.com" target="_blank" rel="noopener">建筑专业的网址之家</a></td>
<td><a href="http://www.archiname.com" target="_blank" rel="noopener">http://www.archiname.com</a></td>
</tr>
</tbody></table>
<h2 id="程序猿"><a href="#程序猿" class="headerlink" title="程序猿"></a>程序猿</h2><table>
<thead>
<tr>
<th>导航名</th>
<th>地址</th>
</tr>
</thead>
<tbody><tr>
<td><a href="https://csskr.com/" target="_blank" rel="noopener">前端氪</a></td>
<td><a href="https://csskr.com" target="_blank" rel="noopener">https://csskr.com</a></td>
</tr>
<tr>
<td><a href="http://webjike.com/web.html" target="_blank" rel="noopener">小呆-前端导航</a></td>
<td><a href="http://webjike.com/web.html" target="_blank" rel="noopener">http://webjike.com/web.html</a></td>
</tr>
<tr>
<td><a href="http://www.daqianduan.com/nav" target="_blank" rel="noopener">前端网址导航</a></td>
<td><a href="http://www.daqianduan.com/nav" target="_blank" rel="noopener">http://www.daqianduan.com/nav</a></td>
</tr>
<tr>
<td><a href="http://xmn-xdm.com" target="_blank" rel="noopener">小码农前端导航</a></td>
<td><a href="http://xmn-xdm.com" target="_blank" rel="noopener">http://xmn-xdm.com</a></td>
</tr>
<tr>
<td><a href="http://wanandroid.com/navi" target="_blank" rel="noopener">玩Android导航</a></td>
<td><a href="http://wanandroid.com/navi" target="_blank" rel="noopener">http://wanandroid.com/navi</a></td>
</tr>
<tr>
<td><a href="https://e.xitu.io" target="_blank" rel="noopener">掘金酱</a></td>
<td><a href="https://e.xitu.io" target="_blank" rel="noopener">https://e.xitu.io</a></td>
</tr>
<tr>
<td><a href="http://ac.scmor.com/" target="_blank" rel="noopener">谷哥镜像导航</a></td>
<td><a href="http://ac.scmor.com" target="_blank" rel="noopener">http://ac.scmor.com</a></td>
</tr>
<tr>
<td><a href="https://navisec.it" target="_blank" rel="noopener">纳威安全导航</a></td>
<td><a href="https://navisec.it" target="_blank" rel="noopener">https://navisec.it</a></td>
</tr>
<tr>
<td><a href="https://www.jikedaohang.com" target="_blank" rel="noopener">极客导航</a></td>
<td><a href="https://www.jikedaohang.com" target="_blank" rel="noopener">https://www.jikedaohang.com</a></td>
</tr>
</tbody></table>
<h2 id="设计师"><a href="#设计师" class="headerlink" title="设计师"></a>设计师</h2><table>
<thead>
<tr>
<th>导航名</th>
<th>地址</th>
</tr>
</thead>
<tbody><tr>
<td><a href="http://chuangzaoshi.com" target="_blank" rel="noopener">创造狮导航</a></td>
<td><a href="http://chuangzaoshi.com" target="_blank" rel="noopener">http://chuangzaoshi.com</a></td>
</tr>
<tr>
<td><a href="http://hao.uisdc.com/" target="_blank" rel="noopener">优设导航</a></td>
<td><a href="http://hao.uisdc.com" target="_blank" rel="noopener">http://hao.uisdc.com</a></td>
</tr>
<tr>
<td><a href="http://www.niudana.com" target="_blank" rel="noopener">牛大拿设计师导航</a></td>
<td><a href="http://www.niudana.com" target="_blank" rel="noopener">http://www.niudana.com</a></td>
</tr>
<tr>
<td><a href="https://www.91sotu.com/" target="_blank" rel="noopener">搜图导航</a></td>
<td><a href="https://www.91sotu.com" target="_blank" rel="noopener">https://www.91sotu.com</a></td>
</tr>
<tr>
<td><a href="https://idesign.qq.com/#!index/site" target="_blank" rel="noopener">腾讯设计导航</a></td>
<td><a href="https://idesign.qq.com/#!index/site" target="_blank" rel="noopener">https://idesign.qq.com/#!index/site</a></td>
</tr>
<tr>
<td><a href="https://www.seeseed.com" target="_blank" rel="noopener">SeeSeed</a></td>
<td><a href="https://www.seeseed.com" target="_blank" rel="noopener">https://www.seeseed.com</a></td>
</tr>
<tr>
<td><a href="http://hao.shejidaren.com" target="_blank" rel="noopener">设计导航</a></td>
<td><a href="http://hao.shejidaren.com" target="_blank" rel="noopener">http://hao.shejidaren.com</a></td>
</tr>
<tr>
<td><a href="https://creativemass.cn" target="_blank" rel="noopener">创意导航</a></td>
<td><a href="https://creativemass.cn" target="_blank" rel="noopener">https://creativemass.cn</a></td>
</tr>
<tr>
<td><a href="http://lackk.com/nav/" target="_blank" rel="noopener">兰客导航</a></td>
<td><a href="http://lackk.com/nav" target="_blank" rel="noopener">http://lackk.com/nav</a></td>
</tr>
<tr>
<td><a href="http://hao.psefan.com/" target="_blank" rel="noopener">饭团导航</a></td>
<td><a href="http://hao.psefan.com" target="_blank" rel="noopener">http://hao.psefan.com</a></td>
</tr>
<tr>
<td><a href="http://hao.xueui.cn" target="_blank" rel="noopener">UI设计师导航</a></td>
<td><a href="http://hao.xueui.cn" target="_blank" rel="noopener">http://hao.xueui.cn</a></td>
</tr>
<tr>
<td><a href="http://so.uigreat.com" target="_blank" rel="noopener">UI设计师导航2</a></td>
<td><a href="http://so.uigreat.com" target="_blank" rel="noopener">http://so.uigreat.com</a></td>
</tr>
<tr>
<td><a href="https://www.25xt.com/hao/index.html" target="_blank" rel="noopener">25学堂设计师导航</a></td>
<td><a href="https://www.25xt.com/hao/index.html" target="_blank" rel="noopener">https://www.25xt.com/hao/index.html</a></td>
</tr>
<tr>
<td><a href="https://www.zhansousou.com/user_nav/shejishidaohang" target="_blank" rel="noopener">站搜搜设计导航</a></td>
<td><a href="https://www.zhansousou.com/user_nav/shejishidaohang" target="_blank" rel="noopener">https://www.zhansousou.com/user_nav/shejishidaohang</a></td>
</tr>
</tbody></table>
<h2 id="学术"><a href="#学术" class="headerlink" title="学术"></a>学术</h2><table>
<thead>
<tr>
<th>导航名</th>
<th>地址</th>
</tr>
</thead>
<tbody><tr>
<td><a href="http://scholar.chongbuluo.com/" target="_blank" rel="noopener">虫部落-学术</a></td>
<td><a href="http://scholar.chongbuluo.com" target="_blank" rel="noopener">http://scholar.chongbuluo.com</a></td>
</tr>
<tr>
<td><a href="http://hao.muchong.com/" target="_blank" rel="noopener">木虫导航</a></td>
<td><a href="http://hao.muchong.com" target="_blank" rel="noopener">http://hao.muchong.com</a></td>
</tr>
<tr>
<td><a href="http://kbs.cnki.net/" target="_blank" rel="noopener">学术网站大全</a></td>
<td><a href="http://kbs.cnki.net" target="_blank" rel="noopener">http://kbs.cnki.net</a></td>
</tr>
</tbody></table>
<h2 id="在线工具及资源"><a href="#在线工具及资源" class="headerlink" title="在线工具及资源"></a>在线工具及资源</h2><table>
<thead>
<tr>
<th>导航名</th>
<th>地址</th>
</tr>
</thead>
<tbody><tr>
<td><a href="http://tool.uixsj.cn/" target="_blank" rel="noopener">现实君的工具箱</a></td>
<td><a href="http://tool.uixsj.cn" target="_blank" rel="noopener">http://tool.uixsj.cn</a></td>
</tr>
<tr>
<td><a href="http://wxbbx.jh1z.com/" target="_blank" rel="noopener">微信百宝箱</a></td>
<td><a href="http://wxbbx.jh1z.com" target="_blank" rel="noopener">http://wxbbx.jh1z.com</a></td>
</tr>
<tr>
<td><a href="https://tool.lu/" target="_blank" rel="noopener">在线工具–程序猿的工具箱</a></td>
<td><a href="https://tool.lu" target="_blank" rel="noopener">https://tool.lu</a></td>
</tr>
<tr>
<td><a href="http://www.hippter.com/" target="_blank" rel="noopener">PPT资源导航</a></td>
<td><a href="http://www.hippter.com" target="_blank" rel="noopener">http://www.hippter.com</a></td>
</tr>
<tr>
<td><a href="https://uzer.me/" target="_blank" rel="noopener">云端应用空间-PS/Office</a></td>
<td><a href="https://uzer.me" target="_blank" rel="noopener">https://uzer.me</a></td>
</tr>
</tbody></table>
<h2 id="影视"><a href="#影视" class="headerlink" title="影视"></a>影视</h2><table>
<thead>
<tr>
<th>导航名</th>
<th>地址</th>
</tr>
</thead>
<tbody><tr>
<td><a href="http://www.dydh.org/" target="_blank" rel="noopener">电影网站大全</a></td>
<td><a href="http://www.dydh.org" target="_blank" rel="noopener">http://www.dydh.org</a></td>
</tr>
<tr>
<td><a href="http://hao.xsldh.com/" target="_blank" rel="noopener">小森林导航</a></td>
<td><a href="http://hao.xsldh.com" target="_blank" rel="noopener">http://hao.xsldh.com</a></td>
</tr>
</tbody></table>
<h2 id="其它"><a href="#其它" class="headerlink" title="其它"></a>其它</h2><table>
<thead>
<tr>
<th>导航名</th>
<th>地址</th>
</tr>
</thead>
<tbody><tr>
<td><a href="https://www.mjjloc.com" target="_blank" rel="noopener">发卡导航</a></td>
<td><a href="https://www.mjjloc.com" target="_blank" rel="noopener">https://www.mjjloc.com</a></td>
</tr>
</tbody></table>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

        
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block home" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/03/04/%E8%BD%AF%E4%BB%B6%E5%8F%8A%E5%B0%8F%E5%B7%A5%E5%85%B7/81%E7%A7%8D%E7%BD%91%E7%9B%98,%E8%B5%84%E6%BA%90,%E7%A3%81%E9%93%BE%E6%80%BB%E6%9C%89%E4%B8%80%E4%B8%AA%E4%BD%A0%E5%96%9C%E6%AC%A2/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://s2.ax1x.com/2020/02/04/1BYxFx.jpg">
      <meta itemprop="name" content="unltra">
      <meta itemprop="description" content="unltra-blog">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="unltra">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          
            <a href="/2020/03/04/%E8%BD%AF%E4%BB%B6%E5%8F%8A%E5%B0%8F%E5%B7%A5%E5%85%B7/81%E7%A7%8D%E7%BD%91%E7%9B%98,%E8%B5%84%E6%BA%90,%E7%A3%81%E9%93%BE%E6%80%BB%E6%9C%89%E4%B8%80%E4%B8%AA%E4%BD%A0%E5%96%9C%E6%AC%A2/" class="post-title-link" itemprop="url">软件及小工具/81种网盘,资源,磁链总有一个你喜欢</a>
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2020-03-04 22:18:11" itemprop="dateCreated datePublished" datetime="2020-03-04T22:18:11+08:00">2020-03-04</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2020-02-02 15:06:59" itemprop="dateModified" datetime="2020-02-02T15:06:59+08:00">2020-02-02</time>
              </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <p>81种网盘资源<br>喜欢就点赞评论+关注吧</p>
<h3 id="国内网盘-查找电子书，软件，影视番剧必备利器，一般都有"><a href="#国内网盘-查找电子书，软件，影视番剧必备利器，一般都有" class="headerlink" title="国内网盘(*查找电子书，软件，影视番剧必备利器，一般都有)"></a>国内网盘(*查找电子书，软件，影视番剧必备利器，一般都有)</h3><p>1.榆木搜 <a href="http://www.yumuso.com/" target="_blank" rel="noopener">http://www.yumuso.com/</a><br>2.云盘之家 <a href="http://wowenda.com/" target="_blank" rel="noopener">http://wowenda.com/</a><br>3.盘多多 <a href="http://www.panduoduo.net/" target="_blank" rel="noopener">http://www.panduoduo.net/</a><br>4.西林街 <a href="http://www.xilinjie.com/" target="_blank" rel="noopener">http://www.xilinjie.com/</a><br>5.胖次网盘搜索引擎 <a href="http://www.panc.cc/" target="_blank" rel="noopener">http://www.panc.cc/</a><br>6.盘搜 <a href="http://www.pansou.com/" target="_blank" rel="noopener">http://www.pansou.com/</a><br>7.网盘搜 <a href="http://www.wangpansou.com/" target="_blank" rel="noopener">http://www.wangpansou.com/</a><br>8.网盘屋 <a href="http://www.wangpanwu.com/" target="_blank" rel="noopener">http://www.wangpanwu.com/</a><br>9.凌风云搜索<a href="https://www.lingfengyun.com/" target="_blank" rel="noopener">https://www.lingfengyun.com/</a><br>10.5p44网盘搜索 <a href="http://www.5p44.com/" target="_blank" rel="noopener">http://www.5p44.com/</a><br>11.壹s1o搜 <a href="http://www.yiso.me/baidu/" target="_blank" rel="noopener">http://www.yiso.me/baidu/</a><br>12.特百度 <a href="http://www.tebaidu.com/" target="_blank" rel="noopener">http://www.tebaidu.com/</a><br>13.百度云搜索 <a href="http://www.523525.com/" target="_blank" rel="noopener">http://www.523525.com/</a><br>14.网盘007 <a href="https://wangpan007.com/" target="_blank" rel="noopener">https://wangpan007.com/</a><br>15.牛推荐 <a href="http://www.niutuijian.com/" target="_blank" rel="noopener">http://www.niutuijian.com/</a><br>16.OA巴士 <a href="http://115.oa84.com/" target="_blank" rel="noopener">http://115.oa84.com/</a><br>17.麦库搜索 <a href="http://www.huisou.me/" target="_blank" rel="noopener">http://www.huisou.me/</a><br>18.网盘搜搜 <a href="http://wpsoso.com/index.html" target="_blank" rel="noopener">http://wpsoso.com/index.html</a><br>19.云搜 <a href="http://www.daysou.com/" target="_blank" rel="noopener">http://www.daysou.com/</a><br>20.我的盘 <a href="http://www.wodepan.com/" target="_blank" rel="noopener">http://www.wodepan.com/</a><br>21.爱挖盘 <a href="http://www.iwapan.com/" target="_blank" rel="noopener">http://www.iwapan.com/</a><br>22.靠谱 <a href="http://kaopu.so/" target="_blank" rel="noopener">http://kaopu.so/</a><br>23.去转盘 <a href="http://www.quzhuanpan.com/" target="_blank" rel="noopener">http://www.quzhuanpan.com/</a><br>24.坏235 <a href="http://www.huai235.com/" target="_blank" rel="noopener">http://www.huai235.com/</a><br>25.猿小盘 <a href="http://www.cxytiandi.com/" target="_blank" rel="noopener">http://www.cxytiandi.com/</a><br>26.soso云盘 <a href="http://www.sosoyunpan.com/" target="_blank" rel="noopener">http://www.sosoyunpan.com/</a><br>27.盘找找 <a href="http://www.13910.com/" target="_blank" rel="noopener">http://www.13910.com/</a><br>28.微云 <a href="https://www.weiyun.com/" target="_blank" rel="noopener">https://www.weiyun.com/</a><br>29.西边云 <a href="http://www.xibianyun.com/wp/" target="_blank" rel="noopener">http://www.xibianyun.com/wp/</a><br>30.搜奇1库 <a href="https://www.sq1k.cc/" target="_blank" rel="noopener">https://www.sq1k.cc/</a><br>31.胖次 <a href="http://chumhum.com.cn/sopancn.html" target="_blank" rel="noopener">http://chumhum.com.cn/sopancn.html</a><br>32.华为网盘搜索 <a href="http://bdooo.com/" target="_blank" rel="noopener">http://bdooo.com/</a><br>33.众人搜索 <a href="http://wangpan.renrensousuo.com/" target="_blank" rel="noopener">http://wangpan.renrensousuo.com/</a><br>34.印象 <a href="https://impress.pw/" target="_blank" rel="noopener">https://impress.pw/</a><br>35.360云盘 <a href="http://www.360yunp.com/" target="_blank" rel="noopener">http://www.360yunp.com/</a> (不能用)<br>36.盘乐网 <a href="http://www.pan6.com/forum.php" target="_blank" rel="noopener">http://www.pan6.com/forum.php</a><br>37.FilestuBe <a href="http://www.filestube.to/" target="_blank" rel="noopener">http://www.filestube.to/</a><br>38.好BT <a href="http://www.haobt.me/" target="_blank" rel="noopener">http://www.haobt.me/</a><br>39.网盘之家 <a href="http://www.wangpanzhijia.net/" target="_blank" rel="noopener">http://www.wangpanzhijia.net/</a><br>40.H31BT <a href="http://www.h31btz.com/" target="_blank" rel="noopener">http://www.h31btz.com/</a><br>41.搜网 <a href="http://www.sowang.com/" target="_blank" rel="noopener">http://www.sowang.com/</a><br>42.种子搜 <a href="https://www.zhongzidi.com/" target="_blank" rel="noopener">https://www.zhongzidi.com/</a><br>43.Btbit磁力搜索 <a href="http://www.btbit.xyz/" target="_blank" rel="noopener">http://www.btbit.xyz/</a><br>44.屌丝搜 <a href="http://www.diaosisou.org/" target="_blank" rel="noopener">http://www.diaosisou.org/</a><br>45.种子搜索吧 <a href="http://www.cilisharea.com/" target="_blank" rel="noopener">http://www.cilisharea.com/</a><br>46.搜百度盘 <a href="http://www.sobaidupan.com/" target="_blank" rel="noopener">http://www.sobaidupan.com/</a><br>47.RARBT <a href="http://www.rarbt.com/" target="_blank" rel="noopener">http://www.rarbt.com/</a><br>48.RayFile <a href="http://www.rayfile.com/" target="_blank" rel="noopener">http://www.rayfile.com/</a><br>49.盘搜搜 <a href="http://www.pansoso.com/" target="_blank" rel="noopener">http://www.pansoso.com/</a><br>50.云搜一下 <a href="http://sou.wolfbe.com/" target="_blank" rel="noopener">http://sou.wolfbe.com/</a><br>51.BT吧 <a href="http://www.btba.com.cn/" target="_blank" rel="noopener">http://www.btba.com.cn/</a><br>52.笔记社区 <a href="http://www.bijishequ.com/" target="_blank" rel="noopener">http://www.bijishequ.com/</a><br>53.CuteState <a href="http://xiaotouming.cn.cutestat.com/" target="_blank" rel="noopener">http://xiaotouming.cn.cutestat.com/</a><br>54.大地搜索 <a href="https://m.dadiso.com/" target="_blank" rel="noopener">https://m.dadiso.com/</a><br>55.热盘搜 <a href="http://www.repanso.com/" target="_blank" rel="noopener">http://www.repanso.com/</a><br>56.百度云网盘搜索 <a href="http://pan.wokandao.com/" target="_blank" rel="noopener">http://pan.wokandao.com/</a><br>57.BT177 <a href="http://www.bt177.net/" target="_blank" rel="noopener">http://www.bt177.net/</a><br>58.微友 <a href="http://www.weiyoou.com/" target="_blank" rel="noopener">http://www.weiyoou.com/</a></p>
<p>喜欢就点赞评论+关注吧</p>
<h3 id="国外网盘"><a href="#国外网盘" class="headerlink" title="国外网盘"></a>国外网盘</h3><ol>
<li><a href="http://www.filestube.to" target="_blank" rel="noopener">http://www.filestube.to</a> </li>
<li><a href="http://www.hotfilesearch.com/" target="_blank" rel="noopener">http://www.hotfilesearch.com/</a> </li>
<li><a href="http://filepoch.com/" target="_blank" rel="noopener">http://filepoch.com/</a> </li>
<li><a href="http://www.searchshared.com/" target="_blank" rel="noopener">http://www.searchshared.com/</a> </li>
<li><a href="https://rapid-search-engine.com/" target="_blank" rel="noopener">https://rapid-search-engine.com/</a> </li>
<li><a href="http://www.filerantings.com/" target="_blank" rel="noopener">http://www.filerantings.com/</a></li>
</ol>
<h3 id="磁力资源"><a href="#磁力资源" class="headerlink" title="磁力资源"></a>磁力资源</h3><ol>
<li>逛电驴 <a href="http://verycd.gdajie.com/" target="_blank" rel="noopener">http://verycd.gdajie.com/</a> </li>
<li>ED2000 <a href="http://www.ed2000.com/" target="_blank" rel="noopener">http://www.ed2000.com/</a> </li>
<li>SimpleCD <a href="http://simplecd.me/" target="_blank" rel="noopener">http://simplecd.me/</a> </li>
<li>BT云搜 <a href="http://www.btyunsou.me/" target="_blank" rel="noopener">http://www.btyunsou.me/</a> </li>
<li>BtBook <a href="http://www.btwhat.info/" target="_blank" rel="noopener">http://www.btwhat.info/</a> </li>
<li>Cilisoba <a href="http://www.cilisoba.net/" target="_blank" rel="noopener">http://www.cilisoba.net/</a> </li>
<li>Rutracker <a href="http://rutracker.org/forum/index.php" target="_blank" rel="noopener">http://rutracker.org/forum/index.php</a> </li>
<li>搬运工 <a href="http://www.banyungong.org/" target="_blank" rel="noopener">http://www.banyungong.org/</a> </li>
<li>Emule <a href="http://www.emule-project.net/" target="_blank" rel="noopener">http://www.emule-project.net/</a> </li>
<li>Torrents <a href="https://torrents.me/" target="_blank" rel="noopener">https://torrents.me/</a> </li>
<li>Torrentdownloads <a href="http://www.torrentdownloads.me/" target="_blank" rel="noopener">http://www.torrentdownloads.me/</a> </li>
<li>BTkitty <a href="http://cnbtkitty.com/" target="_blank" rel="noopener">http://cnbtkitty.com/</a> </li>
<li>比特鱼 <a href="http://www.bitfish8.com/" target="_blank" rel="noopener">http://www.bitfish8.com/</a> </li>
<li>Filespart <a href="http://filespart.com/" target="_blank" rel="noopener">http://filespart.com/</a> </li>
<li>BytesLand <a href="http://bytesland.com/" target="_blank" rel="noopener">http://bytesland.com/</a> </li>
<li>TorrentUs <a href="http://torrentus.si/" target="_blank" rel="noopener">http://torrentus.si/</a></li>
</ol>
<h3 id="电影，番剧"><a href="#电影，番剧" class="headerlink" title="电影，番剧"></a>电影，番剧</h3><ol>
<li>茶杯狐 <a href="https://www.cupfox.com/" target="_blank" rel="noopener">https://www.cupfox.com/</a></li>
<li>韩影盘 <a href="http://www.hanypan.com/" target="_blank" rel="noopener">http://www.hanypan.com/</a></li>
<li>你的私人追剧管家 <a href="https://neets.cc" target="_blank" rel="noopener">https://neets.cc</a> [neets影视大全]</li>
</ol>
<h3 id="软件下载"><a href="#软件下载" class="headerlink" title="软件下载"></a>软件下载</h3><ol>
<li>Ghostxx <a href="http://ghostxx.com/" target="_blank" rel="noopener">http://ghostxx.com/</a></li>
<li>3d66  <a href="https://www.3d66.com/" target="_blank" rel="noopener">https://www.3d66.com/</a> [PS/PR常用3D软件破解下载]</li>
</ol>
<h2 id="喜欢就点赞评论-关注吧"><a href="#喜欢就点赞评论-关注吧" class="headerlink" title="喜欢就点赞评论+关注吧"></a>喜欢就点赞评论+关注吧</h2><p>作者：Running_Tiger<br>来源：CSDN<br>原文：<a href="https://blog.csdn.net/qq_41455420/article/details/78984076" target="_blank" rel="noopener">https://blog.csdn.net/qq_41455420/article/details/78984076</a><br>版权声明：本文为博主原创文章，转载请附上博文链接！</p>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

        
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block home" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/03/04/%E8%84%9A%E6%9C%AC/Auto-js%E9%9B%B6%E6%95%A3%E4%BE%8B%E5%AD%90/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://s2.ax1x.com/2020/02/04/1BYxFx.jpg">
      <meta itemprop="name" content="unltra">
      <meta itemprop="description" content="unltra-blog">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="unltra">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          
            <a href="/2020/03/04/%E8%84%9A%E6%9C%AC/Auto-js%E9%9B%B6%E6%95%A3%E4%BE%8B%E5%AD%90/" class="post-title-link" itemprop="url">脚本/Auto-js零散例子</a>
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2020-03-04 22:18:11" itemprop="dateCreated datePublished" datetime="2020-03-04T22:18:11+08:00">2020-03-04</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2020-02-02 15:06:59" itemprop="dateModified" datetime="2020-02-02T15:06:59+08:00">2020-02-02</time>
              </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h2 id="飞行模式切换IP"><a href="#飞行模式切换IP" class="headerlink" title="飞行模式切换IP"></a>飞行模式切换IP</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">function</span> 打开飞行模式(<span class="params"></span>) </span>&#123;</span><br><span class="line">  <span class="comment">// 打开飞行模式</span></span><br><span class="line">  <span class="keyword">new</span> Shell().exec(<span class="string">"su -c 'settings put global airplane_mode_on 1; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true'"</span>)</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">function</span> 关闭飞行模式(<span class="params"></span>) </span>&#123;</span><br><span class="line">  <span class="comment">//关闭飞行模式</span></span><br><span class="line">  <span class="keyword">new</span> Shell().exec(<span class="string">"su -c 'settings put global airplane_mode_on 0; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false'"</span>)</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>

<h2 id="点击指定区域"><a href="#点击指定区域" class="headerlink" title="点击指定区域"></a>点击指定区域</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">while</span> (<span class="literal">true</span>) &#123;</span><br><span class="line"> click(<span class="number">500</span>, <span class="number">380</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">//或者用</span></span><br><span class="line"><span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; <span class="number">7</span>; i++) &#123;</span><br><span class="line">	click(<span class="number">500</span>, <span class="number">380</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>


<h2 id="自动打开网址"><a href="#自动打开网址" class="headerlink" title="自动打开网址"></a>自动打开网址</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">"Auto"</span></span><br><span class="line">app.openUrl(<span class="string">"http://chapai.act.qq.com/ph2"</span>);</span><br></pre></td></tr></table></figure>



<h2 id="微信轰炸机"><a href="#微信轰炸机" class="headerlink" title="微信轰炸机"></a>微信轰炸机</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"><span class="string">"auto"</span>;</span><br><span class="line"><span class="comment">//进入短信发送信息界面，自动进行轰炸</span></span><br><span class="line"><span class="comment">//自行更改需要发送的内容</span></span><br><span class="line"><span class="comment">//土豪专用轰炸机</span></span><br><span class="line">launchApp(<span class="string">"短信"</span>);</span><br><span class="line"></span><br><span class="line">waitForPackage(<span class="string">"com.android.mms"</span>);</span><br><span class="line">toast(<span class="string">"轰炸机已准备"</span>);</span><br><span class="line"></span><br><span class="line"><span class="keyword">while</span>(<span class="literal">true</span>)&#123;</span><br><span class="line">	</span><br><span class="line">	setText(<span class="string">"你好世界！"</span>);</span><br><span class="line">id(<span class="string">"send_button"</span>).click();</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h2 id="防检测按键脚本（范围选点）"><a href="#防检测按键脚本（范围选点）" class="headerlink" title="防检测按键脚本（范围选点）"></a>防检测按键脚本（范围选点）</h2><p>random（X，Y）是数值区间，<br>调出手机指针位置后可以找出适合的区间<br>脚本例子:</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">"auto"</span>;</span><br><span class="line">launchApp(<span class="string">"appname"</span>)</span><br><span class="line">sleep(<span class="number">1000</span>)</span><br><span class="line">click(random(<span class="number">60</span>, <span class="number">1000</span>), random(<span class="number">60</span>, <span class="number">1660</span>))</span><br><span class="line">sleep(<span class="number">500</span>);</span><br><span class="line">click(random(<span class="number">60</span>, <span class="number">1000</span>), random(<span class="number">60</span>, <span class="number">1660</span>))</span><br><span class="line">sleep(<span class="number">500</span>);</span><br><span class="line">click(random(<span class="number">870</span>, <span class="number">1030</span>), random(<span class="number">130</span>, <span class="number">400</span>))</span><br></pre></td></tr></table></figure>

<h2 id="无限每隔10毫秒点击手机屏幕任意位置"><a href="#无限每隔10毫秒点击手机屏幕任意位置" class="headerlink" title="无限每隔10毫秒点击手机屏幕任意位置"></a>无限每隔10毫秒点击手机屏幕任意位置</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line">auto();</span><br><span class="line"><span class="built_in">console</span>.show();</span><br><span class="line"><span class="built_in">console</span>.info(<span class="string">"按音量上键开始，按音量下键结束"</span>);</span><br><span class="line">events.observeKey();</span><br><span class="line"><span class="comment">//按音量上键结束</span></span><br><span class="line">events.onKeyDown(<span class="string">"volume_down"</span>, <span class="function"><span class="keyword">function</span>(<span class="params">event</span>)</span>&#123;</span><br><span class="line">	threads.shutDownAll();</span><br><span class="line"><span class="built_in">console</span>.info(<span class="string">"已结束"</span>);</span><br><span class="line">exit();</span><br><span class="line">&#125;);</span><br><span class="line"></span><br><span class="line">events.onKeyDown(<span class="string">"volume_up"</span>, <span class="function"><span class="keyword">function</span>(<span class="params">event</span>)</span>&#123;</span><br><span class="line">	threads.start(<span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>&#123;</span><br><span class="line">	<span class="comment">//无限每隔10ms点击屏幕任意位置一次</span></span><br><span class="line"><span class="keyword">while</span>(<span class="literal">true</span>)&#123;</span><br><span class="line">	<span class="keyword">var</span> x = random(<span class="number">0</span>, device.width);</span><br><span class="line"><span class="keyword">var</span> y = random(<span class="number">0</span>, device.height);</span><br><span class="line">click(x, y);</span><br><span class="line"><span class="built_in">console</span>.log(<span class="string">"(%d, %d)"</span>, x, y);</span><br><span class="line">sleep(<span class="number">1000</span>);</span><br><span class="line">&#125;</span><br><span class="line">&#125;);</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure>

<h2 id="屏幕解锁"><a href="#屏幕解锁" class="headerlink" title="屏幕解锁"></a>屏幕解锁</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br></pre></td><td class="code"><pre><span class="line">sleep(<span class="number">5000</span>)<span class="comment">//设定时间</span></span><br><span class="line"><span class="comment">//////////唤醒手机///////////</span></span><br><span class="line"></span><br><span class="line"><span class="comment">/*判断屏幕锁定，解锁屏幕（数字密码）*/</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> (!device.isScreenOn()) &#123;<span class="comment">//息屏状态将屏幕唤醒</span></span><br><span class="line">	</span><br><span class="line">	device.wakeUp();<span class="comment">//唤醒设备</span></span><br><span class="line"></span><br><span class="line">sleep(<span class="number">1000</span>); <span class="comment">// 等待屏幕亮起</span></span><br><span class="line"></span><br><span class="line"><span class="comment">//miui锁屏滑动不能唤出密码输入 通过下拉通知栏点击时间进入密码解锁</span></span><br><span class="line"></span><br><span class="line">swipe(<span class="number">500</span>, <span class="number">30</span>, <span class="number">500</span>, <span class="number">1000</span>, <span class="number">300</span>);</span><br><span class="line"></span><br><span class="line">sleep(<span class="number">400</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">//点击时间</span></span><br><span class="line"></span><br><span class="line">click(<span class="number">100</span>, <span class="number">120</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">//解锁 密码1234</span></span><br><span class="line"></span><br><span class="line">desc(<span class="number">1</span>).findOne().click();</span><br><span class="line"></span><br><span class="line">desc(<span class="number">2</span>).findOne().click();</span><br><span class="line"></span><br><span class="line">desc(<span class="number">3</span>).findOne().click();</span><br><span class="line"></span><br><span class="line">desc(<span class="number">4</span>).findOne().click();</span><br><span class="line"></span><br><span class="line"><span class="comment">//等待解锁完成，返回并退出</span></span><br><span class="line"></span><br><span class="line">back();</span><br><span class="line">exit()</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h2 id="抖音弹窗处理"><a href="#抖音弹窗处理" class="headerlink" title="抖音弹窗处理"></a>抖音弹窗处理</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//监听弹窗事件(异常处理)</span></span><br><span class="line">threads.start(<span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>&#123;</span><br><span class="line">    <span class="keyword">while</span>(<span class="literal">true</span>)&#123;</span><br><span class="line">        sleep(<span class="number">1200</span>);</span><br><span class="line">        <span class="keyword">if</span>(text(<span class="string">'发现通讯录好友'</span>).exists())&#123;</span><br><span class="line">            text(<span class="string">'取消'</span>).click();</span><br><span class="line">        &#125;;</span><br><span class="line">    &#125;;</span><br><span class="line">    &#125;);</span><br></pre></td></tr></table></figure>

<h2 id="百度手机分辨率"><a href="#百度手机分辨率" class="headerlink" title="百度手机分辨率"></a>百度手机分辨率</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br></pre></td><td class="code"><pre><span class="line">log(<span class="string">"脚本有时测得分辨率不对 导致用户无法使用 可以用此方法"</span>);</span><br><span class="line"><span class="keyword">var</span> 正确的分辨率高=百度手机分辨率();</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">function</span> 百度手机分辨率(<span class="params"></span>)</span>&#123;</span><br><span class="line">    <span class="keyword">var</span> fblheight;</span><br><span class="line">    <span class="keyword">var</span> mmm2=<span class="string">"https://www.so.com/s?q="</span>+device.device+<span class="string">"+分辨率"</span>;</span><br><span class="line">    thread1=threads.start(<span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>&#123;  </span><br><span class="line">        log(<span class="string">"百度手机分辨率 开始"</span>);</span><br><span class="line">        <span class="keyword">try</span> &#123;</span><br><span class="line">            <span class="keyword">var</span> res = http.get(mmm2);</span><br><span class="line">            <span class="keyword">if</span>(res.statusCode == <span class="number">200</span>)&#123;</span><br><span class="line">                log(<span class="string">"网页打开成功..."</span>);</span><br><span class="line">                <span class="keyword">var</span> httpstr = res.body.string();</span><br><span class="line">                <span class="keyword">var</span> sousuostr=<span class="string">"x"</span>+device.width;</span><br><span class="line">                <span class="keyword">var</span> index = httpstr.indexOf(sousuostr);</span><br><span class="line">                <span class="keyword">if</span>(index&gt;<span class="number">0</span>)&#123;</span><br><span class="line">                    fblheight = <span class="built_in">parseInt</span>(httpstr.substring(index<span class="number">-4</span>,index));</span><br><span class="line">                    log(<span class="string">"百度成功 分辨率高为："</span>+fblheight);</span><br><span class="line">                &#125;<span class="keyword">else</span>&#123;</span><br><span class="line">                    fblheight=<span class="string">"百度失败"</span>;</span><br><span class="line">                    log(<span class="string">"没有检索到分辨率信息"</span>);</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125; <span class="keyword">catch</span> (error) &#123;</span><br><span class="line">            log(<span class="string">"百度手机分辨率 异常!!!"</span>);</span><br><span class="line">            fblheight=<span class="string">"查找异常"</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        log(<span class="string">"百度手机分辨率 结束"</span>);</span><br><span class="line">    &#125;);</span><br><span class="line">    thread1.join(<span class="number">2000</span>);</span><br><span class="line">    thread1.interrupt();</span><br><span class="line">    <span class="keyword">return</span> fblheight;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">log(<span class="string">"正确的分辨率高:"</span>+正确的分辨率高);</span><br><span class="line">log(<span class="string">"脚本测得分辨率高:"</span>+device.height);</span><br></pre></td></tr></table></figure>

<h2 id="禁止脚本多次运行"><a href="#禁止脚本多次运行" class="headerlink" title="禁止脚本多次运行"></a>禁止脚本多次运行</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment"> * Author:TimeOut</span></span><br><span class="line"><span class="comment"> * Date: 2018.12.18</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"> </span><br><span class="line"> <span class="comment">//获取当前所运行的脚本</span></span><br><span class="line"><span class="keyword">var</span> list = engines.all();</span><br><span class="line"><span class="comment">//双循环比较</span></span><br><span class="line"><span class="keyword">for</span> (<span class="keyword">var</span> i = <span class="number">0</span>; i &lt; list.length; i++) &#123;</span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">var</span> j = i + <span class="number">1</span>; j &lt; list.length; j++) &#123;</span><br><span class="line">       <span class="comment">//比较是否只有一个运行</span></span><br><span class="line">        <span class="keyword">if</span> (list[i].getSource().toString() == list[j].getSource().toString()) &#123;</span><br><span class="line">            <span class="comment">//停止二次运行的脚本</span></span><br><span class="line">            list[j].forceStop();</span><br><span class="line">        &#125;;</span><br><span class="line">    &#125;;</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>

<h2 id="Http代理-讯代理动态转发示例"><a href="#Http代理-讯代理动态转发示例" class="headerlink" title="[Http代理] 讯代理动态转发示例"></a>[Http代理] 讯代理动态转发示例</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/** </span></span><br><span class="line"><span class="comment"> * 使用时传入url和端口即可 </span></span><br><span class="line"><span class="comment"> * 例如: httpProxy("forward.xdaili.cn", 80);</span></span><br><span class="line"><span class="comment"> *   此函数生效后,在此函数后的所有 Http 请求都会通过该代理去完成</span></span><br><span class="line"><span class="comment"> *  <span class="doctag">@param <span class="type">&#123;string&#125;</span> </span>url </span></span><br><span class="line"><span class="comment"> *  <span class="doctag">@param <span class="type">&#123;int&#125;</span> </span>prot </span></span><br><span class="line"><span class="comment"> * */</span></span><br><span class="line"> <span class="function"><span class="keyword">function</span> <span class="title">httpProxy</span>(<span class="params">url, prot</span>) </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> <span class="built_in">Proxy</span> = java.net.Proxy;</span><br><span class="line">    <span class="keyword">var</span> InetSocketAddress = java.net.InetSocketAddress;</span><br><span class="line">    <span class="keyword">var</span> okhttp = <span class="keyword">new</span> Packages.okhttp3.OkHttpClient.Builder().proxy(<span class="keyword">new</span> <span class="built_in">Proxy</span>(<span class="built_in">Proxy</span>.Type.HTTP, <span class="keyword">new</span> InetSocketAddress(url, prot)));</span><br><span class="line">    http.__okhttp__.muteClient(okhttp);</span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">/** </span></span><br><span class="line"><span class="comment"> * 以下是讯代理的 动态转发 请求示例 </span></span><br><span class="line"><span class="comment"> * 讯代理官方网站: http://www.xdaili.cn </span></span><br><span class="line"><span class="comment"> * 20元 10万次 请求 </span></span><br><span class="line"><span class="comment"> * */</span></span><br><span class="line"> <span class="keyword">var</span> orderNo = <span class="string">""</span>; <span class="comment">//动态转发的订单号 </span></span><br><span class="line"><span class="keyword">var</span> secret = <span class="string">""</span>; <span class="comment">//讯代理的secret,个人中心查看 </span></span><br><span class="line"><span class="keyword">var</span> getMd5 = http.get(<span class="string">'https://script.iqqclub.com/md5.js'</span>);</span><br><span class="line"><span class="built_in">eval</span>(getMd5.body.string());</span><br><span class="line">httpProxy(<span class="string">"forward.xdaili.cn"</span>, <span class="number">80</span>);</span><br><span class="line"><span class="keyword">var</span> html = http.get(<span class="string">"http://www.diaoyu.com"</span>, getHeaders());</span><br><span class="line">log(html.body.string());</span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">getHeaders</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> timestamp = <span class="built_in">Math</span>.round(<span class="keyword">new</span> <span class="built_in">Date</span>() / <span class="number">1000</span>);</span><br><span class="line">    <span class="keyword">var</span> planText = <span class="string">"orderno="</span> + orderNo + <span class="string">",secret="</span> + secret + <span class="string">",timestamp="</span> + timestamp;</span><br><span class="line">    <span class="keyword">var</span> sign = hex_md5(planText).toLocaleUpperCase(); <span class="comment">//将拼接的字符串MD5后,转换成大写 </span></span><br><span class="line">    <span class="keyword">var</span> header = &#123;</span><br><span class="line">        headers: &#123; <span class="string">'Proxy-Authorization'</span>: <span class="string">'sign='</span> + sign + <span class="string">'&amp;orderno='</span> + orderNo + <span class="string">'&amp;timestamp='</span> + timestamp, &#125;</span><br><span class="line">    &#125;;</span><br><span class="line">    <span class="keyword">return</span> header;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="Http代理-讯代理优质代理示例"><a href="#Http代理-讯代理优质代理示例" class="headerlink" title="[Http代理]讯代理优质代理示例"></a>[Http代理]讯代理优质代理示例</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/** * 讯代理 优质代理 示例 * </span></span><br><span class="line"><span class="comment"> * 不支持多线程获取 * </span></span><br><span class="line"><span class="comment"> * 脚本中的订单 有效日期截止到: 2018-10-15 15:28 过期后将不可用 * </span></span><br><span class="line"><span class="comment"> * 讯代理官方网站: http://www.xdaili.cn</span></span><br><span class="line"><span class="comment"> * */</span></span><br><span class="line"> <span class="keyword">var</span> spiderId = <span class="string">"7ab204de5b7e403caada6398f29c2831"</span>; <span class="comment">//spiderId </span></span><br><span class="line"><span class="keyword">var</span> orderNo = <span class="string">"YZ20188145457DGCJTP"</span>; <span class="comment">//订单号 </span></span><br><span class="line"><span class="keyword">var</span> getIp_api = http.get(<span class="string">'http://pv.sohu.com/cityjson?ie=utf-8'</span>);</span><br><span class="line"><span class="keyword">var</span> InetIP = getIp_api.body.string();</span><br><span class="line"><span class="built_in">eval</span>(InetIP);</span><br><span class="line">log(<span class="string">"使用代理前的外网IP:"</span> + returnCitySN.cip);</span><br><span class="line"><span class="keyword">var</span> xdailiUrl = <span class="string">"http://api.xdaili.cn/xdaili-api//greatRecharge/getGreatIp?spiderId="</span> + spiderId + <span class="string">"&amp;orderno="</span> + orderNo + <span class="string">"&amp;returnType=2&amp;count=1"</span>;</span><br><span class="line"><span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; <span class="number">3</span>; i++) &#123;</span><br><span class="line">    <span class="keyword">try</span> &#123;</span><br><span class="line">        <span class="keyword">var</span> getProxy_json = http.get(xdailiUrl).body.json();</span><br><span class="line">        <span class="keyword">if</span> (getProxy_json.ERRORCODE == <span class="string">"10036"</span> || getProxy_json.ERRORCODE == <span class="string">"10038"</span> || getProxy_json.ERRORCODE == <span class="string">"10055"</span>) &#123;</span><br><span class="line">            <span class="keyword">throw</span> &#123;</span><br><span class="line">                <span class="string">"code"</span>: <span class="string">"-1"</span>,</span><br><span class="line">                <span class="string">"msg"</span>: <span class="string">"提取速度过快"</span></span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (getProxy_json.ERRORCODE == <span class="string">"10036"</span>) &#123;</span><br><span class="line">            <span class="keyword">throw</span> &#123;</span><br><span class="line">                <span class="string">"code"</span>: <span class="string">"-2"</span>,</span><br><span class="line">                <span class="string">"msg"</span>: <span class="string">"提取次数已达上限"</span></span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">break</span>;</span><br><span class="line">    &#125; <span class="keyword">catch</span> (e) &#123;</span><br><span class="line">        <span class="keyword">if</span> (e.code == <span class="string">"-1"</span>) &#123;</span><br><span class="line">            log(e.msg);</span><br><span class="line">            sleep(<span class="number">5000</span>);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (e.code == <span class="string">"-2"</span>) &#123;</span><br><span class="line">            log(e.msg);</span><br><span class="line">            exit();</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (i == <span class="number">2</span>) &#123; <span class="comment">//运行3次后,没有拿到IP和端口 程序结束 log("发生了未知错误,请检查网络..."); </span></span><br><span class="line">            exit();</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">//log(getProxy_json); </span></span><br><span class="line"><span class="keyword">var</span> xdaili_proxyIP = getProxy_json.RESULT[<span class="number">0</span>].ip;</span><br><span class="line"><span class="keyword">var</span> xdaili_proxyPort = <span class="built_in">parseInt</span>(getProxy_json.RESULT[<span class="number">0</span>].port); <span class="comment">//log(xdaili_proxyIP+":"+xdaili_proxyPort); </span></span><br><span class="line">httpProxy(xdaili_proxyIP, xdaili_proxyPort);</span><br><span class="line"><span class="keyword">var</span> getIp_api = http.get(<span class="string">'http://pv.sohu.com/cityjson?ie=utf-8'</span>);</span><br><span class="line"><span class="keyword">var</span> InetIP = getIp_api.body.string();</span><br><span class="line"><span class="built_in">eval</span>(InetIP);</span><br><span class="line">log(<span class="string">"使用代理后的外网IP:"</span> + returnCitySN.cip);</span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">httpProxy</span>(<span class="params">url, prot</span>) </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> <span class="built_in">Proxy</span> = java.net.Proxy;</span><br><span class="line">    <span class="keyword">var</span> InetSocketAddress = java.net.InetSocketAddress;</span><br><span class="line">    <span class="keyword">var</span> okhttp = <span class="keyword">new</span> Packages.okhttp3.OkHttpClient.Builder().proxy(<span class="keyword">new</span> <span class="built_in">Proxy</span>(<span class="built_in">Proxy</span>.Type.HTTP, <span class="keyword">new</span> InetSocketAddress(url, prot)));</span><br><span class="line">    http.__okhttp__.muteClient(okhttp);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="获取指定应用的版本号"><a href="#获取指定应用的版本号" class="headerlink" title="获取指定应用的版本号"></a>获取指定应用的版本号</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment">* 获取指定应用的版本号</span></span><br><span class="line"><span class="comment">* @param &#123;string&#125; packageName 应用包名</span></span><br><span class="line"><span class="comment">*/</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">getPackageVersion</span>(<span class="params">packageName</span>) </span>&#123;</span><br><span class="line">    importPackage(android.content);</span><br><span class="line">    <span class="keyword">var</span> pckMan = context.getPackageManager();</span><br><span class="line">    <span class="keyword">var</span> packageInfo = pckMan.getPackageInfo(packageName, <span class="number">0</span>);</span><br><span class="line">    <span class="keyword">return</span> packageInfo.versionName;</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>
<h2 id="停止APP"><a href="#停止APP" class="headerlink" title="停止APP"></a>停止APP</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 停止APP</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">killApp</span>(<span class="params">packageName</span>) </span>&#123;</span><br><span class="line">    shell(<span class="string">'am force-stop '</span> + packageName, <span class="literal">true</span>);</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>
<h2 id="卸载APP"><a href="#卸载APP" class="headerlink" title="卸载APP"></a>卸载APP</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 卸载APP</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">uninstallApp</span>(<span class="params">packageName</span>) </span>&#123;</span><br><span class="line">    shell(<span class="string">"pm uninstall "</span> + packageName, <span class="literal">true</span>)</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>
<h2 id="清除App数据"><a href="#清除App数据" class="headerlink" title="清除App数据"></a>清除App数据</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 清除App数据</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">clearApp</span>(<span class="params">packageName</span>) </span>&#123;</span><br><span class="line">    shell(<span class="string">'pm clear '</span> + packageName, <span class="literal">true</span>);</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>
<h2 id="卸载最新安装的app"><a href="#卸载最新安装的app" class="headerlink" title="卸载最新安装的app"></a>卸载最新安装的app</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 卸载最新安装的app</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">uninstallAppLast</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> pm = context.getPackageManager()</span><br><span class="line">    <span class="keyword">var</span> appList = pm.getInstalledApplications(<span class="number">0</span>)</span><br><span class="line">    <span class="keyword">var</span> appInfoList = []</span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; appList.size(); i++) &#123;</span><br><span class="line">        <span class="keyword">var</span> app = appList.get(i)</span><br><span class="line">        <span class="keyword">var</span> appInfo = &#123;</span><br><span class="line">            appName: app.loadLabel(pm),</span><br><span class="line">            packageName: app.packageName,</span><br><span class="line">            isSystemApp: app.isSystemApp(),</span><br><span class="line">            firstInstallTime: pm.getPackageInfo(app.packageName, <span class="number">0</span>).firstInstallTime</span><br><span class="line">        &#125;</span><br><span class="line">        appInfoList.push(appInfo)</span><br><span class="line">        </span><br><span class="line">    &#125;</span><br><span class="line">    appInfoList.sort(<span class="function">(<span class="params">a, b</span>) =&gt;</span> &#123;</span><br><span class="line">        <span class="keyword">return</span> b.firstInstallTime - a.firstInstallTime</span><br><span class="line">    &#125;)</span><br><span class="line">    log(<span class="string">'最新安装的app是=%j'</span>, appInfoList[<span class="number">0</span>])</span><br><span class="line">    </span><br><span class="line">    <span class="keyword">var</span> packageName = appInfoList[<span class="number">0</span>].packageName</span><br><span class="line">    shell(<span class="string">"pm uninstall "</span> + packageName, <span class="literal">true</span>)</span><br><span class="line">    <span class="keyword">return</span> appInfoList[<span class="number">0</span>].appName</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>
<h2 id="清除最新安装的APP数据"><a href="#清除最新安装的APP数据" class="headerlink" title="清除最新安装的APP数据"></a>清除最新安装的APP数据</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 清除最新安装的APP数据</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">clearAppLast</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> pm = context.getPackageManager()</span><br><span class="line">    <span class="keyword">var</span> appList = pm.getInstalledApplications(<span class="number">0</span>)</span><br><span class="line">    <span class="keyword">var</span> appInfoList = []</span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; appList.size(); i++) &#123;</span><br><span class="line">        <span class="keyword">var</span> app = appList.get(i)</span><br><span class="line">        <span class="keyword">var</span> appInfo = &#123;</span><br><span class="line">            appName: app.loadLabel(pm),</span><br><span class="line">            packageName: app.packageName,</span><br><span class="line">            isSystemApp: app.isSystemApp(),</span><br><span class="line">            firstInstallTime: pm.getPackageInfo(app.packageName, <span class="number">0</span>).firstInstallTime</span><br><span class="line">        &#125;</span><br><span class="line">        appInfoList.push(appInfo)</span><br><span class="line">        </span><br><span class="line">    &#125;</span><br><span class="line">    appInfoList.sort(<span class="function">(<span class="params">a, b</span>) =&gt;</span> &#123;</span><br><span class="line">        <span class="keyword">return</span> b.firstInstallTime - a.firstInstallTime</span><br><span class="line">    &#125;)</span><br><span class="line">    log(<span class="string">'最新安装的app是=%j'</span>, appInfoList[<span class="number">0</span>])</span><br><span class="line">    </span><br><span class="line">    <span class="keyword">var</span> packageName = appInfoList[<span class="number">0</span>].packageName</span><br><span class="line">    shell(<span class="string">'pm clear '</span> + packageName, <span class="literal">true</span>);</span><br><span class="line">    <span class="keyword">return</span> appInfoList[<span class="number">0</span>].appName</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>
<h2 id="停止最新安装的APP"><a href="#停止最新安装的APP" class="headerlink" title="停止最新安装的APP"></a>停止最新安装的APP</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 停止最新安装的APP</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">killAppLast</span> </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> pm = context.getPackageManager()</span><br><span class="line">    <span class="keyword">var</span> appList = pm.getInstalledApplications(<span class="number">0</span>)</span><br><span class="line">    <span class="keyword">var</span> appInfoList = []</span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; appList.size(); i++) &#123;</span><br><span class="line">        <span class="keyword">var</span> app = appList.get(i)</span><br><span class="line">        <span class="keyword">var</span> appInfo = &#123;</span><br><span class="line">            appName: app.loadLabel(pm),</span><br><span class="line">            packageName: app.packageName,</span><br><span class="line">            isSystemApp: app.isSystemApp(),</span><br><span class="line">            firstInstallTime: pm.getPackageInfo(app.packageName, <span class="number">0</span>).firstInstallTime</span><br><span class="line">        &#125;</span><br><span class="line">        appInfoList.push(appInfo)</span><br><span class="line">        </span><br><span class="line">    &#125;</span><br><span class="line">    appInfoList.sort(<span class="function">(<span class="params">a, b</span>) =&gt;</span> &#123;</span><br><span class="line">        <span class="keyword">return</span> b.firstInstallTime - a.firstInstallTime</span><br><span class="line">    &#125;)</span><br><span class="line">    log(<span class="string">'最新安装的app是=%j'</span>, appInfoList[<span class="number">0</span>])</span><br><span class="line">    </span><br><span class="line">    <span class="keyword">var</span> packageName = appInfoList[<span class="number">0</span>].packageName</span><br><span class="line">    shell(<span class="string">'am force-stop '</span> + packageName, <span class="literal">true</span>);</span><br><span class="line">    <span class="keyword">return</span> appInfoList[<span class="number">0</span>].appName</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>
<h2 id="启动最新安装的APP"><a href="#启动最新安装的APP" class="headerlink" title="启动最新安装的APP"></a>启动最新安装的APP</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 启动最新安装的APP</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">launchAppLast</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> pm = context.getPackageManager()</span><br><span class="line">    <span class="keyword">var</span> appList = pm.getInstalledApplications(<span class="number">0</span>)</span><br><span class="line">    <span class="keyword">var</span> appInfoList = []</span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; appList.size(); i++) &#123;</span><br><span class="line">        <span class="keyword">var</span> app = appList.get(i)</span><br><span class="line">        <span class="keyword">var</span> appInfo = &#123;</span><br><span class="line">            appName: app.loadLabel(pm),</span><br><span class="line">            packageName: app.packageName,</span><br><span class="line">            isSystemApp: app.isSystemApp(),</span><br><span class="line">            firstInstallTime: pm.getPackageInfo(app.packageName, <span class="number">0</span>).firstInstallTime</span><br><span class="line">        &#125;</span><br><span class="line">        appInfoList.push(appInfo)</span><br><span class="line">        </span><br><span class="line">    &#125;</span><br><span class="line">    appInfoList.sort(<span class="function">(<span class="params">a, b</span>) =&gt;</span> &#123;</span><br><span class="line">        <span class="keyword">return</span> b.firstInstallTime - a.firstInstallTime</span><br><span class="line">    &#125;)</span><br><span class="line">    log(<span class="string">'最新安装的app是=%j'</span>, appInfoList[<span class="number">0</span>])</span><br><span class="line">    </span><br><span class="line">    <span class="keyword">var</span> packageName = appInfoList[<span class="number">0</span>].packageName</span><br><span class="line">    launch(packageName)</span><br><span class="line">    <span class="keyword">return</span> appInfoList[<span class="number">0</span>].appName</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>

<h2 id="获取用户安装的app"><a href="#获取用户安装的app" class="headerlink" title="获取用户安装的app"></a>获取用户安装的app</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">getUserAppList</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> pm = context.getPackageManager()</span><br><span class="line">    <span class="keyword">var</span> appList = pm.getInstalledApplications(<span class="number">0</span>)</span><br><span class="line">    <span class="keyword">var</span> appInfoList = []</span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; appList.size(); i++) &#123;</span><br><span class="line">        <span class="keyword">var</span> app = appList.get(i)</span><br><span class="line">        <span class="keyword">var</span> appInfo = &#123;</span><br><span class="line">            appName: app.loadLabel(pm),</span><br><span class="line">            packageName: app.packageName,</span><br><span class="line">            isSystemApp: app.isSystemApp(),</span><br><span class="line">            firstInstallTime: pm.getPackageInfo(app.packageName, <span class="number">0</span>).firstInstallTime</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">if</span> (!app.isSystemApp()) &#123;</span><br><span class="line">            appInfoList.push(appInfo)</span><br><span class="line">        &#125;</span><br><span class="line">        </span><br><span class="line">        log(appInfoList)</span><br><span class="line">    &#125;</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>



<h2 id="失去焦点"><a href="#失去焦点" class="headerlink" title="失去焦点"></a>失去焦点</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 失去焦点</span></span><br><span class="line"><span class="built_in">window</span>.disableFocus();</span><br></pre></td></tr></table></figure>
<h2 id="系统是否ROOT"><a href="#系统是否ROOT" class="headerlink" title="系统是否ROOT"></a>系统是否ROOT</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 系统是否ROOT</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">isRoot</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> r = shell(<span class="string">"ls /system/bin"</span>, <span class="literal">true</span>).result.toString()</span><br><span class="line">    <span class="keyword">if</span> (r.length &gt; <span class="number">50</span>) &#123;</span><br><span class="line">        <span class="keyword">return</span> <span class="literal">true</span></span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">        <span class="keyword">return</span> <span class="literal">false</span></span><br><span class="line">    &#125;</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>

<h2 id="获取指定应用的版本号-1"><a href="#获取指定应用的版本号-1" class="headerlink" title="获取指定应用的版本号"></a>获取指定应用的版本号</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment">* 获取指定应用的版本号</span></span><br><span class="line"><span class="comment">* @param &#123;string&#125; packageName 应用包名</span></span><br><span class="line"><span class="comment">*/</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">getPackageVersion</span>(<span class="params">packageName</span>) </span>&#123;</span><br><span class="line">    importPackage(android.content);</span><br><span class="line">    <span class="keyword">var</span> pckMan = context.getPackageManager();</span><br><span class="line">    <span class="keyword">var</span> packageInfo = pckMan.getPackageInfo(packageName, <span class="number">0</span>);</span><br><span class="line">    <span class="keyword">return</span> packageInfo.versionName;</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>

<h2 id="打开QQ群名片"><a href="#打开QQ群名片" class="headerlink" title="打开QQ群名片"></a>打开QQ群名片</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 打开QQ群名片</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> (<span class="params">qqGroupNum</span>) </span>&#123;</span><br><span class="line">    app.startActivity(&#123;</span><br><span class="line">        action: <span class="string">"android.intent.action.VIEW"</span>,</span><br><span class="line">        data: <span class="string">"mqqapi://card/show_pslcard?card_type=group&amp;uin="</span> + qqGroupNum,</span><br><span class="line">        packageName: <span class="string">"com.tencent.mobileqq"</span>,</span><br><span class="line">    &#125;);</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>

<h2 id="QQ强制聊天"><a href="#QQ强制聊天" class="headerlink" title="QQ强制聊天"></a>QQ强制聊天</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// QQ强制聊天</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">qqChat</span>(<span class="params">qqNum</span>) </span>&#123;</span><br><span class="line">    app.startActivity(&#123;</span><br><span class="line">        action: <span class="string">"android.intent.action.VIEW"</span>,</span><br><span class="line">        data: <span class="string">"mqq://im/chat?chat_type=wpa&amp;version=1&amp;src_type=web&amp;uin="</span> + qqNum,</span><br><span class="line">        packageName: <span class="string">"com.tencent.mobileqq"</span>,</span><br><span class="line">    &#125;);</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>
<h2 id="取md5"><a href="#取md5" class="headerlink" title="取md5"></a>取md5</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 取md5</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">getMd5</span>(<span class="params">string</span>) </span>&#123;</span><br><span class="line">    <span class="keyword">return</span> java.math.BigInteger(<span class="number">1</span>, java.security.MessageDigest.getInstance(<span class="string">"MD5"</span>).digest(java.lang.String(string).getBytes())).toString(<span class="number">16</span>);</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>
<h2 id="网络检测"><a href="#网络检测" class="headerlink" title="网络检测"></a>网络检测</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 网络检测</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">internetCheck</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> intent = <span class="keyword">new</span> Intent();</span><br><span class="line">    importClass(android.content.BroadcastReceiver);</span><br><span class="line">    importClass(android.content.ContextWrapper);</span><br><span class="line">    importClass(android.content.IntentFilter);</span><br><span class="line">    importClass(android.net.ConnectivityManager);</span><br><span class="line">    <span class="keyword">var</span> filter = <span class="keyword">new</span> IntentFilter();</span><br><span class="line">    filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);</span><br><span class="line">    <span class="keyword">new</span> ContextWrapper(context).registerReceiver(a = <span class="keyword">new</span> BroadcastReceiver(&#123;</span><br><span class="line">        onReceive: <span class="function"><span class="keyword">function</span> (<span class="params">context, intent</span>) </span>&#123;</span><br><span class="line">            <span class="keyword">var</span> action = intent.getAction();</span><br><span class="line">            <span class="keyword">if</span> (action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) &#123;</span><br><span class="line">                <span class="keyword">var</span> mConnectivityManager = context.getSystemService(context.CONNECTIVITY_SERVICE);</span><br><span class="line">                netInfo = mConnectivityManager.getActiveNetworkInfo();</span><br><span class="line">                <span class="keyword">if</span> (netInfo != <span class="literal">null</span> &amp;&amp; netInfo.isAvailable()) &#123;</span><br><span class="line">                	</span><br><span class="line">                    <span class="comment">/////////////网络连接</span></span><br><span class="line">                    <span class="keyword">var</span> name = netInfo.getTypeName();</span><br><span class="line">                    </span><br><span class="line">                    <span class="keyword">if</span> (netInfo.getType() == ConnectivityManager.TYPE_WIFI) &#123;</span><br><span class="line">                        <span class="comment">/////WiFi网络</span></span><br><span class="line">                        toastLog(<span class="string">"WiFi网络"</span>);</span><br><span class="line">                        <span class="keyword">return</span> <span class="string">"WiFi网络"</span></span><br><span class="line">                    &#125; <span class="keyword">else</span> <span class="keyword">if</span> (netInfo.getType() == ConnectivityManager.TYPE_ETHERNET) &#123;</span><br><span class="line">                        <span class="comment">/////有线网络</span></span><br><span class="line">                        toastLog(<span class="string">"有线网络"</span>);</span><br><span class="line">                        <span class="keyword">return</span> <span class="string">"有线网络"</span></span><br><span class="line">                        </span><br><span class="line">                    &#125; <span class="keyword">else</span> <span class="keyword">if</span> (netInfo.getType() == ConnectivityManager.TYPE_MOBILE) &#123;</span><br><span class="line">                        <span class="comment">/////////3g网络</span></span><br><span class="line">                        toastLog(<span class="string">"3g网络"</span>);</span><br><span class="line">                        <span class="keyword">return</span> <span class="string">"3g网络"</span></span><br><span class="line">                        </span><br><span class="line">                    &#125;</span><br><span class="line">                &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                    <span class="comment">////////网络断开</span></span><br><span class="line">                    toastLog(<span class="string">"网络断开"</span>);</span><br><span class="line">                    <span class="keyword">return</span> <span class="string">"网络断开"</span></span><br><span class="line">                    </span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line">            </span><br><span class="line">        &#125;</span><br><span class="line">    &#125;), filter);</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>


<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 获取手机ip地理位置</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">getAction</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> ip地理位置 = <span class="literal">false</span></span><br><span class="line">    <span class="keyword">var</span> ip地理位置正则 = <span class="regexp">/本机IP:&amp;nbsp;\d&#123;1,3&#125;\.\d&#123;1,3&#125;\.\d&#123;1,3&#125;\.\d&#123;1,3&#125;&lt;\/span&gt;([\s\S]*?)&lt;\/td/</span></span><br><span class="line">    <span class="keyword">var</span> ipUrl = <span class="string">"http://www.baidu.com/s?ie=UTF-8&amp;wd=ip%E5%BD%92%E5%B1%9E%E5%9C%B0%E6%9F%A5%E8%AF%A2"</span></span><br><span class="line">    <span class="keyword">var</span> r = http.get(ipUrl);</span><br><span class="line">    log(<span class="string">"code = "</span> + r.statusCode);</span><br><span class="line">    <span class="keyword">var</span> htmlResult = r.body.string()</span><br><span class="line">    ip地理位置 = ip地理位置正则.exec(htmlResult)</span><br><span class="line">    <span class="keyword">if</span> (ip地理位置) &#123;</span><br><span class="line">        ip地理位置 = ip地理位置正则.exec(ip地理位置)</span><br><span class="line">        ip地理位置 = ip地理位置[<span class="number">1</span>]</span><br><span class="line">        toastLog(ip地理位置)</span><br><span class="line">        <span class="keyword">return</span> ip地理位置</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">        log(<span class="string">'没有查询到Ip地理位置,脚本停止'</span>)</span><br><span class="line">        <span class="keyword">return</span> <span class="literal">false</span></span><br><span class="line">    &#125;</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>

<h2 id="自定义位置提示块"><a href="#自定义位置提示块" class="headerlink" title="自定义位置提示块"></a>自定义位置提示块</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//自定义位置提示块</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">toastEx</span>(<span class="params">msg, x, y</span>) </span>&#123;</span><br><span class="line">    importClass(android.widget.Toast);</span><br><span class="line">    importClass(android.view.Gravity);</span><br><span class="line">    <span class="keyword">var</span> toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT);</span><br><span class="line">    toast.setGravity(Gravity.TOP | Gravity.LEFT, x, y);</span><br><span class="line">    toast.show();</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>


<h2 id="比较日期大小"><a href="#比较日期大小" class="headerlink" title="比较日期大小"></a>比较日期大小</h2><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"><span class="keyword">let</span> begintime = <span class="string">'2019-11-25'</span></span><br><span class="line"><span class="keyword">let</span> endtime = getNowFormatDate()</span><br><span class="line">log(endtime)</span><br><span class="line">log(compareDate(begintime, endtime))</span><br><span class="line"></span><br><span class="line"><span class="comment">// 比较日期大小</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">compareDate</span>(<span class="params">begintime, endtime</span>) </span>&#123;</span><br><span class="line">    <span class="keyword">return</span> ((<span class="keyword">new</span> <span class="built_in">Date</span>(begintime.replace(<span class="regexp">/-/g</span>, <span class="string">"\/"</span>))) &lt; (<span class="keyword">new</span> <span class="built_in">Date</span>(endtime.replace(<span class="regexp">/-/g</span>, <span class="string">"\/"</span>))));</span><br><span class="line">&#125;;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 获取当前日期2019-11-26</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">getNowFormatDate</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> date = <span class="keyword">new</span> <span class="built_in">Date</span>();</span><br><span class="line">    <span class="keyword">var</span> seperator1 = <span class="string">"-"</span>;</span><br><span class="line">    <span class="keyword">var</span> year = date.getFullYear();</span><br><span class="line">    <span class="keyword">var</span> month = date.getMonth() + <span class="number">1</span>;</span><br><span class="line">    <span class="keyword">var</span> strDate = date.getDate();</span><br><span class="line">    <span class="keyword">if</span> (month &gt;= <span class="number">1</span> &amp;&amp; month &lt;= <span class="number">9</span>) &#123;</span><br><span class="line">        month = <span class="string">"0"</span> + month;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">if</span> (strDate &gt;= <span class="number">0</span> &amp;&amp; strDate &lt;= <span class="number">9</span>) &#123;</span><br><span class="line">        strDate = <span class="string">"0"</span> + strDate;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">var</span> currentdate = year + seperator1 + month + seperator1 + strDate;</span><br><span class="line">    <span class="keyword">return</span> currentdate;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

        
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block home" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/03/04/%E8%84%9A%E6%9C%AC/Auto-js%E8%BD%AF%E4%BB%B6%E5%B7%A5%E5%85%B7%E9%9B%86%E5%90%88/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://s2.ax1x.com/2020/02/04/1BYxFx.jpg">
      <meta itemprop="name" content="unltra">
      <meta itemprop="description" content="unltra-blog">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="unltra">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          
            <a href="/2020/03/04/%E8%84%9A%E6%9C%AC/Auto-js%E8%BD%AF%E4%BB%B6%E5%B7%A5%E5%85%B7%E9%9B%86%E5%90%88/" class="post-title-link" itemprop="url">脚本/Auto-js软件工具集合</a>
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2020-03-04 22:18:11" itemprop="dateCreated datePublished" datetime="2020-03-04T22:18:11+08:00">2020-03-04</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2020-02-02 15:06:59" itemprop="dateModified" datetime="2020-02-02T15:06:59+08:00">2020-02-02</time>
              </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h5 id="在学习和使用Auto-js时用到的软件工具等等；"><a href="#在学习和使用Auto-js时用到的软件工具等等；" class="headerlink" title="在学习和使用Auto.js时用到的软件工具等等；"></a>在学习和使用Auto.js时用到的软件工具等等；</h5><blockquote>
<p>学习/教程/文档</p>
</blockquote>
<ul>
<li>社区: <a href="https://www.autojs.org" target="_blank" rel="noopener">https://www.autojs.org</a></li>
<li>Auto.js 源码: <a href="https://github.com/hyb1996/Auto.js" target="_blank" rel="noopener">https://github.com/hyb1996/Auto.js</a></li>
<li>官方文档: <a href="https://hyb1996.github.io/AutoJs-Docs/#/" target="_blank" rel="noopener">https://hyb1996.github.io/AutoJs-Docs</a></li>
<li>Auto.js官方教程(从入门到精通): <a href="https://www.bilibili.com/read/readlist/rl27762" target="_blank" rel="noopener">https://www.bilibili.com/read/readlist/rl27762</a></li>
<li>JavaScript 教程/菜鸟教程 <a href="https://www.runoob.com/js/js-tutorial.html" target="_blank" rel="noopener">https://www.runoob.com/js/js-tutorial.html</a></li>
<li>笔青居Auto.js哔哩哔哩视频教程 <a href="https://space.bilibili.com/21486893" target="_blank" rel="noopener">https://space.bilibili.com/21486893</a></li>
</ul>
<blockquote>
<p>案例/现成脚本</p>
</blockquote>
<ul>
<li>官方应用内置脚本案例  <a href="https://github.com/hyb1996/Auto.js/tree/master/app/src/main/assets/sample" target="_blank" rel="noopener">https://github.com/hyb1996/Auto.js/tree/master/app/src/main/assets/sample</a></li>
<li>蚂蚁森林能量智能收取脚本: <a href="https://github.com/SuperMonster003/Auto.js_Projects/tree/Ant_Forest" target="_blank" rel="noopener">Ant_Forest</a></li>
<li>autojs 登陆脚本 <a href="https://github.com/bjc5233/autojs" target="_blank" rel="noopener">https://github.com/bjc5233/autojs</a></li>
<li>autojs 注册登陆签到脚本 <a href="https://github.com/bayson/autojs" target="_blank" rel="noopener">https://github.com/bayson/autojs</a></li>
<li>一些autojs的脚本仓库: <a href="https://github.com/snailuncle/autojsDemo" target="_blank" rel="noopener">snailuncle/autojsDemo</a></li>
<li>2019淘宝双11喵币: <a href="https://github.com/Rukawalee/Scripts/tree/master/taobao/2019/11.11" target="_blank" rel="noopener">https://github.com/Rukawalee/Scripts/tree/master/taobao/2019/11.11</a></li>
<li>2019淘宝双12活动: <a href="https://github.com/Rukawalee/Scripts/tree/master/taobao/2019/12.12" target="_blank" rel="noopener">https://github.com/Rukawalee/Scripts/tree/master/taobao/2019/12.12</a></li>
</ul>
<blockquote>
<p>电脑端</p>
</blockquote>
<h4 id="1-开发软件"><a href="#1-开发软件" class="headerlink" title="1. 开发软件"></a>1. 开发软件</h4><ul>
<li><a href="https://code.visualstudio.com/Download" target="_blank" rel="noopener">VS Code</a> <strong>电脑端开发Auto.js脚本</strong> AND <a href="https://github.com/hyb1996/Auto.js-VSCode-Extension" target="_blank" rel="noopener">VS Code 插件</a></li>
<li><a href="https://www.lanzous.com/i8953je" target="_blank" rel="noopener">autojs PC IDE 1.2.6</a> <strong>开发Auto.js的IDE</strong> 有方便的UI编写功能 </li>
</ul>
<h4 id="2-投屏"><a href="#2-投屏" class="headerlink" title="2. 投屏"></a>2. 投屏</h4><ul>
<li><a href="http://tc.sigma-rt.com.cn" target="_blank" rel="noopener">Total Control</a> <strong>电脑控制手机，显示手机屏幕内容</strong></li>
<li><a href="http://www.vysor.io" target="_blank" rel="noopener">Vysor</a> <strong>手机高清投影到PC</strong></li>
<li><a href="https://gitee.com/Barryda/QtScrcpy" target="_blank" rel="noopener">QtScrcpy</a> <strong>Android实时投屏软件</strong></li>
<li><a href="https://github.com/Tomotoes/scrcpy-gui" target="_blank" rel="noopener">Scrcpy GUI</a> <strong>Scrcpy 的图形界面版</strong></li>
</ul>
<h4 id="3-安卓模拟器"><a href="#3-安卓模拟器" class="headerlink" title="3. 安卓模拟器"></a>3. 安卓模拟器</h4><ul>
<li>夜神模拟器 <a href="https://www.yeshen.com" target="_blank" rel="noopener">https://www.yeshen.com</a></li>
<li>逍遥模拟器 <a href="http://www.xyaz.cn" target="_blank" rel="noopener">http://www.xyaz.cn</a></li>
<li>雷电模拟器 <a href="https://www.ldmnq.com" target="_blank" rel="noopener">https://www.ldmnq.com</a></li>
<li>蓝叠模拟器 <a href="https://www.bluestacks.cn" target="_blank" rel="noopener">https://www.bluestacks.cn</a></li>
<li>Mumu模拟器 <a href="http://mumu.163.com" target="_blank" rel="noopener">http://mumu.163.com</a></li>
</ul>
<blockquote>
<p>免费API</p>
</blockquote>
<ul>
<li>干货集中营API <a href="http://gank.io/api" target="_blank" rel="noopener">http://gank.io/api</a></li>
<li>接口大全 <a href="https://www.free-api.com" target="_blank" rel="noopener">https://www.free-api.com</a><br><a href="https://github.com/fangzesheng/free-api" target="_blank" rel="noopener">https://github.com/fangzesheng/free-api</a></li>
</ul>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

        
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block home" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/03/04/%E8%84%9A%E6%9C%AC/Auto-js%E7%BB%BC%E8%BF%B0/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://s2.ax1x.com/2020/02/04/1BYxFx.jpg">
      <meta itemprop="name" content="unltra">
      <meta itemprop="description" content="unltra-blog">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="unltra">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          
            <a href="/2020/03/04/%E8%84%9A%E6%9C%AC/Auto-js%E7%BB%BC%E8%BF%B0/" class="post-title-link" itemprop="url">脚本/Auto-js综述</a>
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2020-03-04 22:18:11" itemprop="dateCreated datePublished" datetime="2020-03-04T22:18:11+08:00">2020-03-04</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2020-02-02 15:06:59" itemprop="dateModified" datetime="2020-02-02T15:06:59+08:00">2020-02-02</time>
              </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <p>Auto.js使用<a href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript" target="_blank" rel="noopener">JavaScript</a>作为脚本语言，目前使用<a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Projects/Rhino" target="_blank" rel="noopener">Rhino 1.7.7.2</a>作为脚本引擎，支持ES5与部分ES6特性。</p>
<ul>
<li>因为Auto.js是基于JavaScript的，学习Auto.js的API之前建议先学习JavaScript的基本语法和内置对象，可以使用教程前面的两个JavaScript教程链接来学习。</li>
<li>如果您想要使用TypeScript来开发，目前已经有开发者公布了一个可以把使用TypeScript进行Auto.js开发的工具，参见<a href="https://github.com/pboymt/autojs-dev" target="_blank" rel="noopener">Auto.js DevTools</a>。</li>
<li>如果想要在电脑而不是手机上开发Auto.js，可以使用VS Code以及相应的Auto.js插件使得在电脑上编辑的脚本能推送到手机运行，参见<a href="https://github.com/hyb1996/Auto.js-VSCode-Extension" target="_blank" rel="noopener">Auto.js-VSCode-Extension</a>。</li>
</ul>
<p>本文档的章节大致上是以模块来分的，总体上可以分成”自动操作”类模块(控件操作、触摸模拟、按键模拟等)和其他类模块(设备、应用、界面等)。</p>
<p>“自动操作”的部分又可以大致分为基于控件和基于坐标的操作。基于坐标的操作是传统按键精灵、触摸精灵等脚本软件采用的方式，通过屏幕坐标来点击、长按指定位置模拟操作，从而到达目的。例如<code>click(100, 200)</code>, <code>press(100, 200, 500)</code>等。这种方式在游戏类脚本中比较有可行性，结合找图找色、坐标放缩功能也能达到较好的兼容性。但是，这种方式对一般软件脚本却难以达到想要的效果，而且这种方式需要安卓7.0版本以上或者root权限才能执行。所以对于一般软件脚本(例如批量添加联系人、自动提取短信验证码等等)，我们采用基于控件的模拟操作方式，结合通知事情、按键事情等达成更好的工作流。这些部分的文档参见<a href="https://unltra.github.io/AutoJs-Docs/#/widgets-based-automation.html" target="_blank" rel="noopener">基于控件的操作</a>和<a href="https://unltra.github.io/AutoJs-Docs/#/coordinates-based-automation.html" target="_blank" rel="noopener">基于坐标的操作</a>。</p>
<p>其他部分主要包括：</p>
<ul>
<li>app: 应用。启动应用，卸载应用，使用应用查看、编辑文件、访问网页，发送应用间广播等。</li>
<li>console: 控制台。记录运行的日志、错误、信息等。</li>
<li>device: 设备。获取设备屏幕宽高、系统版本等信息，控制设备音量、亮度等。</li>
<li>engines: 脚本引擎。用于启动其他脚本。</li>
<li>events: 事件与监听。按键监听，通知监听，触摸监听等。</li>
<li>floaty: 悬浮窗。用于显示自定义的悬浮窗。</li>
<li>files: 文件系统。文件创建、获取信息、读写。</li>
<li>http: HTTP。发送HTTP请求，例如GET, POST等。</li>
<li>images, colors: 图片和图色处理。截图，剪切图片，找图找色，读取保存图片等。</li>
<li>keys: 按键模拟。比如音量键、Home键模拟等。</li>
<li>shell: Shell命令。</li>
<li>threads: 多线程支持。</li>
<li>ui: UI界面。用于显示自定义的UI界面，和用户交互。</li>
</ul>
<p>除此之外，Auto.js内置了对<a href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise" target="_blank" rel="noopener">Promise</a>。</p>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

        
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block home" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/03/04/%E8%84%9A%E6%9C%AC/Auto-js%E5%AD%A6%E4%B9%A0%E5%B0%8F%E8%AE%A1-%E6%9C%9F%E9%97%B4%E9%81%87%E5%88%B0%E9%97%AE%E9%A2%98%E5%92%8C%E8%84%B1%E5%9D%91/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://s2.ax1x.com/2020/02/04/1BYxFx.jpg">
      <meta itemprop="name" content="unltra">
      <meta itemprop="description" content="unltra-blog">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="unltra">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          
            <a href="/2020/03/04/%E8%84%9A%E6%9C%AC/Auto-js%E5%AD%A6%E4%B9%A0%E5%B0%8F%E8%AE%A1-%E6%9C%9F%E9%97%B4%E9%81%87%E5%88%B0%E9%97%AE%E9%A2%98%E5%92%8C%E8%84%B1%E5%9D%91/" class="post-title-link" itemprop="url">脚本/Auto-js学习小计-期间遇到问题和脱坑</a>
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2020-03-04 22:18:11" itemprop="dateCreated datePublished" datetime="2020-03-04T22:18:11+08:00">2020-03-04</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2020-02-02 15:06:59" itemprop="dateModified" datetime="2020-02-02T15:06:59+08:00">2020-02-02</time>
              </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <ol>
<li>VSCode调试代码引用模块 <figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> common = <span class="built_in">require</span>(<span class="string">'common.js'</span>);</span><br></pre></td></tr></table></figure>
报错  <strong>Error: Module “common.js” not found. (file:///android_asset/modules/jvm-npm.js#89)</strong></li>
</ol>
<blockquote>
<p><strong>解决方案</strong>：原因是调试时不会把common.js模块文件一起推送到手机设备上，使用VSCode的快捷命令 <strong>Auto.js:Save On Device.</strong> 把引用的模块代码保存在手机上，这样代码才能引用</p>
</blockquote>
<ol start="2">
<li>在auto.js界面中使用launch(“”)可以启动app，回到手机桌面后，就启动不了</li>
</ol>
<blockquote>
<p><strong>解决方案</strong>：在应用设置中找到Auto.js（如果是打包的，那就找到对应打包的apk），勾选允许“后台弹出界面”，允许应用在后台弹出界面。不同手机系统不一样，叫的名字可能不大一样，所以自己大概看看同一个意思的，把它权限勾选上</p>
</blockquote>
<ol start="3">
<li>在此页面有弹窗，弹窗上有控件信息，但是识别不到</li>
</ol>
<blockquote>
<p><strong>解决方案</strong>：</p>
</blockquote>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

        
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block home" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/03/04/%E8%84%9A%E6%9C%AC/Auto-js-%E5%AE%89%E5%8D%93intent%E7%9B%B8%E5%85%B3%E5%AE%9E%E7%8E%B0/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://s2.ax1x.com/2020/02/04/1BYxFx.jpg">
      <meta itemprop="name" content="unltra">
      <meta itemprop="description" content="unltra-blog">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="unltra">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          
            <a href="/2020/03/04/%E8%84%9A%E6%9C%AC/Auto-js-%E5%AE%89%E5%8D%93intent%E7%9B%B8%E5%85%B3%E5%AE%9E%E7%8E%B0/" class="post-title-link" itemprop="url">脚本/Auto-js-安卓intent相关实现</a>
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2020-03-04 22:18:11" itemprop="dateCreated datePublished" datetime="2020-03-04T22:18:11+08:00">2020-03-04</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2020-02-02 15:06:59" itemprop="dateModified" datetime="2020-02-02T15:06:59+08:00">2020-02-02</time>
              </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h4 id="常用函数"><a href="#常用函数" class="headerlink" title="常用函数"></a><code>常用函数</code></h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">&#x2F;&#x2F; 点击控件的bounds的rect的中点</span><br><span class="line">function clickBounds(obj) &#123;</span><br><span class="line">    var bounds &#x3D; obj.bounds();</span><br><span class="line">    click(bounds.centerX(),bounds.centerY());</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">&#x2F;&#x2F; 暂停n秒</span><br><span class="line">function sleepSec(n) &#123;</span><br><span class="line">    sleep(n * 1000);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h1 id="一、微博"><a href="#一、微博" class="headerlink" title="一、微博"></a>一、微博</h1><blockquote>
<p>通过intent分享文本到微博</p>
</blockquote>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">importClass(java.io.File);</span><br><span class="line">importClass(android.net.Uri);</span><br><span class="line">importPackage(android.content);</span><br><span class="line">importClass(java.net.URLEncoder);</span><br><span class="line">importClass(android.provider.MediaStore);</span><br><span class="line"></span><br><span class="line">var content &#x3D; &quot;Hello World!&quot;;</span><br><span class="line">var intent &#x3D; new Intent();</span><br><span class="line">intent.setAction(Intent.ACTION_VIEW)</span><br><span class="line">intent.addCategory(&quot;android.intent.category.DEFAULT&quot;);</span><br><span class="line">intent.setData(Uri.parse(&quot;sinaweibo:&#x2F;&#x2F;sendweibo?content&#x3D;&quot;+URLEncoder.encode(content)));</span><br><span class="line">app.startActivity(intent);</span><br><span class="line">var sendBtn &#x3D; desc(&quot;发送&quot;);</span><br><span class="line">sendBtn.waitfor;</span><br><span class="line">clickBounds(sendBtn.findOne());</span><br><span class="line"></span><br><span class="line">&#x2F;&#x2F;另一种实现</span><br><span class="line">function shareTextToWeibo(autoSend) &#123;</span><br><span class="line">	var content &#x3D; getRandomMsg();</span><br><span class="line">	var intent &#x3D; new Intent();</span><br><span class="line">	intent.setType(&quot;text&#x2F;plain&quot;);</span><br><span class="line">	intent.setAction(Intent.ACTION_SEND);</span><br><span class="line">	intent.putExtra(Intent.EXTRA_TEXT,getRandomMsg());</span><br><span class="line">	&#x2F;&#x2F;intent.setPackage(&quot;com.weico.international&quot;); &#x2F;&#x2F;微博国际版</span><br><span class="line">	intent.setComponent(new ComponentName(&quot;com.sina.weibo&quot;, &quot;com.sina.weibo.composerinde.ComposerDispatchActivity&quot;));</span><br><span class="line">	app.startActivity(intent);</span><br><span class="line">	if(autoSend &#x3D;&#x3D; false) return;</span><br><span class="line"></span><br><span class="line">	var sendBtn &#x3D; desc(&quot;发送&quot;);</span><br><span class="line">	sendBtn.waitfor;</span><br><span class="line">	sleepSec(2.5);</span><br><span class="line">	clickBounds(sendBtn.findOne());</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<blockquote>
<p>分享图片/视频到微博</p>
</blockquote>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line">importClass(java.io.File);</span><br><span class="line">importClass(android.net.Uri);</span><br><span class="line">importPackage(android.content);</span><br><span class="line">importClass(java.net.URLEncoder);</span><br><span class="line">importClass(android.provider.MediaStore);</span><br><span class="line"></span><br><span class="line">&#x2F;** </span><br><span class="line"> * 分享内容到微博</span><br><span class="line"> * @param &#123;string&#125; filePath 文件路径</span><br><span class="line"> * @param &#123;string&#125; textContent 文本</span><br><span class="line"> * @param &#123;string&#125; fileType 文件类型 图片: image&#x2F;*  文字: text&#x2F;plain  音乐: audio&#x2F;*  视频: video&#x2F;*</span><br><span class="line">*&#x2F;</span><br><span class="line">function shareToWeiboWithFile (filePath, textContent, fileType) &#123;	</span><br><span class="line">	var intent &#x3D; new Intent();</span><br><span class="line">	intent.setType(fileType);</span><br><span class="line">	intent.setAction(Intent.ACTION_SEND);</span><br><span class="line">	var f &#x3D; new File(filePath);</span><br><span class="line">	var fp &#x3D; app.parseUri(Uri.fromFile(f).toString());</span><br><span class="line">	intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(f));</span><br><span class="line">	intent.setClipData(ClipData.newRawUri(MediaStore.EXTRA_OUTPUT, fp));</span><br><span class="line">	intent.putExtra(Intent.EXTRA_TEXT,textContent);</span><br><span class="line">	intent.setComponent(new ComponentName(&quot;com.sina.weibo&quot;, &quot;com.sina.weibo.composerinde.ComposerDispatchActivity&quot;));</span><br><span class="line">	app.startActivity(intent);</span><br><span class="line">	</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<blockquote>
<p>根据用户昵称nick—–跳转到用户微博详情页</p>
</blockquote>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">function goToUserInfo()&#123;</span><br><span class="line">	var intent&#x3D;new Intent();</span><br><span class="line">	var nickName &#x3D; &quot;甜菜欣欣&quot;;</span><br><span class="line">	intent.setAction(Intent.ACTION_VIEW);</span><br><span class="line">	intent.addCategory(&quot;android.intent.category.DEFAULT&quot;);</span><br><span class="line">	&#x2F;&#x2F;intent.setData(Uri.parse(&quot;sinaweibo:&#x2F;&#x2F;userinfo?nick&#x3D;&quot;+URLEncoder.encode(nickName)));</span><br><span class="line">	intent.setData(Uri.parse(&quot;sinaweibo:&#x2F;&#x2F;userinfo?nick&#x3D;&quot;+nickName));</span><br><span class="line">	app.startActivity(intent);</span><br><span class="line">	sleepSec(3);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h1 id="二、微信"><a href="#二、微信" class="headerlink" title="二、微信"></a>二、微信</h1><blockquote>
<p>分享文件到微信指定联系人</p>
</blockquote>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br></pre></td><td class="code"><pre><span class="line">importClass(java.io.File);</span><br><span class="line">importClass(android.net.Uri);</span><br><span class="line">importPackage(android.content);</span><br><span class="line">importClass(java.net.URLEncoder);</span><br><span class="line">importClass(android.provider.MediaStore);</span><br><span class="line"></span><br><span class="line">&#x2F;** </span><br><span class="line"> * 分享内容到微信</span><br><span class="line"> * @param &#123;string&#125; filePath 文件路径</span><br><span class="line"> * @param &#123;string&#125; fileType 文件类型 图片: image&#x2F;*  文字: text&#x2F;plain  音乐: audio&#x2F;*  视频: video&#x2F;*</span><br><span class="line">*&#x2F;</span><br><span class="line">function shareToFriendWithFile (filePath, fileType) &#123;	</span><br><span class="line">	var intent &#x3D; new Intent();</span><br><span class="line">	intent.setType(fileType);</span><br><span class="line">	intent.setAction(Intent.ACTION_SEND);</span><br><span class="line">	var f &#x3D; new File(filePath);</span><br><span class="line">	var fp &#x3D; app.parseUri(Uri.fromFile(f).toString());</span><br><span class="line">	intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(f));</span><br><span class="line">    intent.setClipData(ClipData.newRawUri(MediaStore.EXTRA_OUTPUT, fp));</span><br><span class="line">	intent.setComponent(new ComponentName(&quot;com.tencent.mm&quot;,&quot;com.tencent.mm.ui.tools.ShareImgUI&quot;));</span><br><span class="line">	app.startActivity(intent);</span><br><span class="line">    </span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">&#x2F;** </span><br><span class="line"> * 查找指定联系人分享</span><br><span class="line"> * @param &#123;string&#125; contactManName 联系人昵称</span><br><span class="line"> * @param &#123;string&#125; message 留言</span><br><span class="line">*&#x2F;</span><br><span class="line">function searchMan(contactManName, message) &#123;</span><br><span class="line"></span><br><span class="line">    &#x2F;&#x2F;点击搜索</span><br><span class="line">    var searchBtn &#x3D; id(&quot;c2c&quot;).text(&quot;搜索&quot;);</span><br><span class="line">    searchBtn.waitfor;</span><br><span class="line">    clickBounds(searchBtn.findOne());</span><br><span class="line">    sleepSec(1);</span><br><span class="line"></span><br><span class="line">    &#x2F;&#x2F;输入 联系人昵称 TODO: 昵称搜索方式有潜在问题</span><br><span class="line">    className(&quot;EditText&quot;).findOne().setText(contactManName);</span><br><span class="line">    sleepSec(1);</span><br><span class="line"></span><br><span class="line">    &#x2F;&#x2F;点击 联系人</span><br><span class="line">    var contactMan &#x3D; className(&quot;TextView&quot;).text(contactManName);</span><br><span class="line">    contactMan.waitfor;</span><br><span class="line">    clickBounds(contactMan.findOne());</span><br><span class="line">    sleepSec(1);</span><br><span class="line">    &#x2F;&#x2F;留言内容</span><br><span class="line">    var textV &#x3D; className(&quot;EditText&quot;).text(&quot;给朋友留言&quot;);</span><br><span class="line">    textV.findOne().setText(message);</span><br><span class="line">    sleepSec(1);</span><br><span class="line">    &#x2F;&#x2F;点击发送</span><br><span class="line">    var sendBtn &#x3D; className(&quot;Button&quot;).text(&quot;发送&quot;);</span><br><span class="line">    clickBounds(sendBtn.findOne());</span><br><span class="line">    </span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>



      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

  </div>

  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let activeClass = CONFIG.comments.activeClass;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          Table of Contents
        </li>
        <li class="sidebar-nav-overview">
          Overview
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="unltra"
      src="https://s2.ax1x.com/2020/02/04/1BYxFx.jpg">
  <p class="site-author-name" itemprop="name">unltra</p>
  <div class="site-description" itemprop="description">unltra-blog</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">9</span>
          <span class="site-state-item-name">posts</span>
        </a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/unltra" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;unltra" rel="noopener" target="_blank"><i class="fa fa-fw fa-github"></i>GitHub</a>
      </span>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">unltra</span>
</div>
<div style="width:300px;margin:0 auto; padding:0 0;" align="center">
<a target="_blank" href="http://www.beian.miit.gov.cn/" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;">
<p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">浙ICP备17019849号-1</p></a>
</div>
<div style="width:300px;margin:0 auto; padding:0 0;" align="center">
  <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=33021202000572" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;">
  <img src="https://s2.ax1x.com/2019/12/18/QHme9s.png" style="float:left;"/>
<p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">浙公网安备 33021202000572号</p></a>
</div>
  <div class="powered-by">Powered by <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> v4.2.0
  </div>
  <span class="post-meta-divider">|</span>
  <div class="theme-info">Theme – <a href="https://pisces.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Pisces</a> v7.7.1
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  

</body>
</html>
